Creating Types From JSON
  • 31 May 2023
  • 1 Minute to read
  • Dark
    Light

Creating Types From JSON

  • Dark
    Light

Article summary

Overview

Users can create new datatypes from JSON formatted objects. The properties of the JSON object will be used to create the fields for the new datatype. 

If the inputted JSON object contains nested objects, then datatypes for the nested objects will also be generated. 

The below section provides an example of creating a new datatype using a JSON object.


  1. Select CREATE DATATYPES/INTEGRATION in a Designer Project from the top action bar. 
  2. In the Create DataTypes/Integration window, select XML/JSON/CSV from the right column, then select Create Types from JSON.
  3. From here, the Edit JSON Structure page will appear. Below is a table that covers the input fields for the new datatype. 
    PropertyDescription
    Json Structure NameThe name of the datatype
    NameSpaceThe namespace for the datatype
    Allow Nullable ValuesAn optional setting that when enabled, allows fields to have null values
    Use JSON FileAn optional setting that allows a JSON file to be uploaded and used as the template for the new datatype.
    Json StructureA field where the datatype can be copied into Decisions. The structure being added here must be a valid JSON formatted object.
  4. Once the structure is configured correctly, click Save Structure. A new Simple Flow structure will be created with the Json Structure Name.

Making changes to the JSON structure

Users can update the generated datatype if changes to the JSON structure need to be made.

  1. Right click the JSONDataStructure within the Project.
  2. Select Edit
  3. The Edit JSON Structure page should open. From here, the JSON used to generate the structure can be updated.
  4. Below is a list of properties available when editing a JSON structure. 
    PropertyDescription
    Json Structure NameThe name of the datatype
    NameSpaceThe namespace for the datatype
    Allow Nullable ValuesAn optional setting that when enabled, allows fields to have null values
    Use JSON FileAn optional setting that allows a JSON file to be uploaded and used as the template for the new datatype.
    Json StructureA field where the datatype can be copied into Decisions. The structure being added here must be a valid JSON formatted object.
    Select DataTypes to Generate Steps ForIf checked, a Serialize and Deserialize JSON step specific to the datatype will be generated.

    The steps can be found under USER DEFINED TYPES > JSON STRUCTURES > [DataStructureName]
    Generated DatatypesA list of generated datatypes that were created based on the inputted JSON. 

Was this article helpful?