Create Object from JSON
Activity converts either a String variable (eg. output from Read Text File), or data from an existing text file into either a Wizlink Data, or custom type variable, depending on chosen output parameter.
Wizlink Data Output requires a variable of type Wizlink Data. Custom Type Output requires a custom object variable that matches the structure of the JSON content.
Only one type of output can be selected.
Wizlink Data Output requires a variable of type Wizlink Data. This is the universal solution, the internal structure of resulting object will be an exact representation of the imported JSON data.
Custom Type Output requires a custom variable that exactly matches the structure of the JSON data you want to import. In the example above the simple JSON structure can be read into a Dictionary of Dictionaries (Dictionary<String,Dictionary<String,String>>)
In both cases, lastName of the employee can be accessed by [name of variable]("employees")("lastName")
Acquired Text | String | Output | text input by user |
---|---|---|---|
Alternative Scenario If Failed | Boolean | Input | checkbox; default is "on" |
Display Name | Literal | Input | changes display name of the activity |
Exclude from Transaction Check | Boolean | Input | checkbox; default is "off" |
Input | String | Input | the input string |
Custom Type Output | - | Output | type of output object (all but WizlinkData) |
Result | Boolean | Output | returns a Boolean value. True if no error in activity, otherwise will return False |
Result Code | Int32 | Output | Result Code will return 0 if there is no error in activity, otherwise in most cases will return 1. See the table of Extended Result Codes for more info |
Wizlink Data Output | WizlinkData | Output | type of output object |