Encoding a Field Value
- 21 Nov 2022
-
DarkLight
-
PDF
Encoding a Field Value
- Updated on 21 Nov 2022
-
DarkLight
-
PDF
Article summary
Did you find this summary helpful?
Thank you for your feedback
Encoding a field value takes the value of the field and runs it through b64 encoding. The encoded result is placed back into the object that will be sent to the other system. It will also decode the response using b64.
If you do not want the response decoded, use a different schema for the request and the response.
To encode a field set the encode flag to true.
Example: Request Token Schema with Encoded Field Value
"$id": "reqTokenSchema.json",
"properties": {
….
"Data": {
"type": "object",
"properties": {
"Data": {
"type": "string",
"encode": true,
"external_name": "Data"
}
},
"external_name": "Data"
} ….
},
"definitions": {}
}
REQUEST WITHOUT ENCODING
{
"Data": {
"returnStatus": false,
"RecordCount": 0,
"Data": "something random"
}
}
REQUEST ENCODED
{
"Data": {
"returnStatus": false,
"RecordCount": 0,
"Data": "c29tZXRoaW5nIHJhbmRvbQ=="
}
Was this article helpful?