Skip to main content

base64

Latest Versionv1.0.0
Input Content Type (Encode)Any
Output Content Type (Encode)text/plain
Input Content Type (Decode)Any
Output Content Type (Decode)application/octet-stream

The base64 transformer encodes data to its Base64 text representation, or decodes existing Base64 data to its binary representation. Decode will fail if the input data is not valid Base64.

Example Usage

Encode:

    transformer:
type: base64
version: v1

Decode:

    transformer:
type: base64
version: v1
parameters:
decode: true

Example Input (Encode)

Path: /sensor0

{
"temp": 55.8324,
"lat": 51.9977,
"long": 0.7407
}

Example Output (Encode)

Path: /sensor0

ewogICJ0ZW1wIjogNTUuODMyNCwKICAibGF0IjogNTEuOTk3NywKICAibG9uZyI6IDAuNzQwNwp9

Example Input (Decode)

Path: /sensor0

ewogICJ0ZW1wIjogNTUuODMyNCwKICAibGF0IjogNTEuOTk3NywKICAibG9uZyI6IDAuNzQwNwp9

Example Output (Decode)

Path: /sensor0

{
"temp": 55.8324,
"lat": 51.9977,
"long": 0.7407
}