Have Questions?  Need Expert Answers?  JOIN LUNCH N' LEARNS!

JSON Deserialization

Prev Next

Step Details

Introduced in Version---
Last Modified in Version7.12.0
LocationData > JSON

The JSON Deserialize converts a string of JSON data into its respective Decisions data object type. The data object type is picked via the Type drop-down, and the string is input via the String to Deserialize Input. This can help convert data that has come into a Flow via REST call into data that Decisions can use.

Prerequisites

This step requires that a JSON type have already been created within the platform. This is one of the parameters that has to be set on the step. See Creating Types From JSON to learn more.



Properties

Parameters

PropertyDescriptionData Type
Show Only User Defined JSON TypesLimits the type drop-down list to only show user-defined JSON Data TypesBoolean
IsOutputArrayChanges the step output to be a list of a type instead of a single typeBoolean
JSON TypeType of string that the step will Deserialize---

Inputs

PropertyDescriptionData Type
String to DeserializeThe input variable to deserialize.String

Outputs

PropertyDescriptionData Type
JsonDeserialize1_OutputThe Deserialization step output variable, can be a list if the IsOuputArray checkbox is set to true.Depends on JSON Type
Error MessageOutput variable for the step error messageString



Example

  1. From the Flow that was previously created using the Serialization article, hover over the Done path of the Json Serialize step and click the plus icon.
  2. Navigate to All Steps [Catalog] > Data > Json, select the Json Deserialize step and click ADD.
  3. With the Json Deserialize step selected, map Json Serialize_ Output to INPUTS > String to Deserialize.
  4. Uncheck Show Only User Defined JSON Type under PARAMETERS.

    Then, under the Type field, enter "account" in the text box and select Account [DecisionsFramework].
  5. In the OUTPUTS category, set Output to Rename. Then, enter "JSonDeserialize_Output" in the text box.

    Connect the Done path to the End step. Then, Save the Flow.

Debug

  1. From the top Action Bar, click Debug. Then, click START DEBUGGING.
  2. Click the Json Deserialize step. Click Execution 1 and select View Output Data.
  3. Verify that the String has been deserialized into each individual data member of the Account Data Type.

Related Information

Forum Posts:
Json Deserialize
JSON Deserialize Step Date Field Issue
JSON Deserialize Issue: MaxJsonLength Error