Encoding a Field Value
  • 21 Nov 2022
  • Dark
    Light
  • PDF

Encoding a Field Value

  • Dark
    Light
  • PDF

Article summary

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?

Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.