- 17 Nov 2020
- 1 Minute to read
- Print
- DarkLight
Deserialization
- Updated on 17 Nov 2020
- 1 Minute to read
- Print
- DarkLight
Overview
Deserialization is the process of reversing a string from a serialized format. The serialized string becomes transformed into a format to allow its data structure properties to be accessible to manipulation. The use case for the steps are similar to the serialization step. In environments where data is being received from external systems via API calls. The Flow steps that used for deserialization are: JSON Deserialize, XML Deserialize, and XSD Deserialize.
JSON Deserialize Step
Setting Category | Name | Explanation |
Parameter | Show Only User Defined JSON Types | Limits the type drop down list to only show user defined JSON Data Types |
Parameter | IsOutputArray | Changes the step to output to be list of a type instead of a single type |
Parameter | JSON Type or Type | The type of string that the step will deserialize |
Inputs | String to Deserializtion | The deserialization step input variable name |
Output | JsonDeserialize1_Output | The deserialization step output variable which can be a list if the "IsOuputArray" checkbox is set to true |
Output | Error Message | Error message output variable |
XML Deserialize Step
Setting Category | Name | Explanation |
Parameter | Show Only User Defined XML Types | Limits the type drop down list to only show user defined XML Data Types |
Parameter | XML Type or Type | The type of string that the step will deserialize |
Inputs | String to Deserialize | The deserialization step input variable name |
Output | XmlDeserialize1_Output | The deserialization step output variable |
Output | Error Message | Error message output variable |
XSD Deserialize Step
Setting Category | Name | Explanation |
Parameter | Show Only User Defined XML Types | Limits the type drop down list to only show user defined XML Data Types |
Parameter | XML Type or Type | The type of string that the step will deserialize |
Inputs | String to Deserialize | The deserialization step input variable name |
Output | XsdDeserialize1_Output | The deserialization step output variable |
Output | Error Message | Error message output variable |
Example
To create a quick example for JSON, drag over the JSON Deserialization step onto the Flow Canvas. Place the step after the 'Json Serialize' step. Map the output of the serialize step into the the input of the deserialize step.
Debug the Flow, and examine the output of the deserialize step. The output is not a single serialized string but is instead a collection of data members that make up the Account Data Type.
An example will be built similarly. Drag the 'XML Deserialize' step after the 'XML Serialize' step. Then map the output of the serialize into the input of the deserialize step.
Finally, debug the flow and view the output of the 'XML Deserialize' step. Notice, that the output does not contain any XML tags on any data members. This is because the string has been deserialized.