Serialization
  • 03 Nov 2020
  • 2 Minutes to read
  • Dark
    Light
  This documentation version is deprecated, please click here for the latest version.

Serialization

  • Dark
    Light

Article summary

Overview 

The process of changing an object into a store-able format is called serialization. There are steps in the Flow Designer that gives users the ability to change data types into store-able, serialized formats. Reasons a user would want to serialize data types would be for API calls or scenarios where system to system integration is needed. The main serialized formats that can be utilized are JSON, XML, and XSD structures, and the Flow Designer contains Serialization steps for those formats.

Json Serialize Step

Setting CategoryNameExplanation
ParameterTypeThe type of data that will be serialized that can be a User Defined type or a default Decisions type
ParameterIgnore NullIgnores all null values in a JSON object
InputObject To SerializeThe input variable, expecting an object from the user select type
OutputJsonSerialize1_OutputThe default variable that stores the Json serialized type
OutputError MessageOutput variable for the step error message

XML Serialize Step

Setting CategoryNameExplanation
OptionsReadable XML OutputWord wraps the output of the step to make it easy to read
OptionsTreat Null String Like Empty StringChanges null strings values into empty string values
OptionsOutput EncodingSupport Encoding of Unicode, ASCII, UTF7, UTF8, or UTF32
OptionsInclude BOM in OutputAdds a Byte Order Mark to the serialized output
ParameterTypeThe type of data that will be serialized that can be a User Defined type or a default Decisions type
InputObject To SerializeThe input variable, expecting an object from the user select type
OutputXmlSerialize1_OutputThe default variable that stores the XML serialized type
OutputError MessageOutput variable for the step error message

XSD Serialize Step

Setting CategoryNameExplanation
OptionsReadable XML OutputWord wraps the output of the step to make it easy to read
OptionsTreat Null String Like Empty StringChanges null strings values into empty string values
OptionsOutput EncodingSupport Encoding of Unicode, ASCII, UTF7, UTF8, or UTF32
OptionsInclude BOM in OutputAdds a Byte Order Mark to the serialized output
ParameterTypeThe type of data that will be serialized that can be a User Defined type or a default Decisions type
InputObject To SerializeThe input variable, expecting an object from the user select type
OutputXSDSerialize1_OutputThe default variable that stores the XSD serialized type
OutputError MessageOutput variable for the step error message

Example

To utilize these steps, open the Flow Designer and drag the 'Fetch Entities' and 'Json Serialize' step. On both steps, set them to expect the default Decisions 'Account' type. Map the first or last value into the input of the 'Json Serialize' step.


Debug the flow to see output of the serialize step has changed the type into a JSON serialized string.


To create an example with XML and XSD merely delete the Json step and add the 'Xml Serialize' or the 'XSD serialize'. On this example, click on the 'Readable XML Output', and configure the inputs like the image below. 


Debug the flow and view the output of the XML serialize step to see the XML serialized string.

Deserialize?
To learn the next step and continue this build follow the example on the"Deserialize" document.

Was this article helpful?