Give us feedback
ardojson
Service icon

ardoJSON

icon_trusted
Stable version 1.10.10 (Compatible with OutSystems 11)
Other versions available for 10 and Older
Uploaded on 9 Jan by 
4.8
 (35 ratings)
ardojson

ardoJSON

Documentation
1.10.10

Instructions


How to use the "Outsystems2JSON" action

The next steps will guide you on how to use this component. In the end, you should have an action that serializes an OutSystems value to JSON.


1. Create the dependencies that allow the usage of the component

The action "Outsystems2JSON" is used to convert OutSystems variables to JSON and send it to external environments.

To use it, add a dependency in your application according to the picture below.



2. Create a flow to transform variables from Outsystems to JSON


Create a server action and call "Outsystems2JSON" action.


For simple and complex types:

Fill the input parameter "value" with the ToObject() function with the variable to transform inside.


See below an example


For DateDatetime and Time:


Fill the input parameter "value" with the ToObject() function with the variable to transform inside. and choose a value between 0 and 3 for the different date format types that are explained in the right comment of the image above.

See below an example

As a result of this transformation now you have the JSON ready to send it to external environments.


How to use the "JSON2Outsystems" action

The next steps will guide you on how to use this component. In the end, you should have an action that adds Records to a Record List containing the de-serialized JSON.


1. Create the dependencies that allow the usage of the component

The action JSON 2 RecordList is used to convert JSON into Outsystems variables in order to be readable in the Outsystems platform.


To use it, add a dependency in your application according to the picture below.



2. Create a flow to transform variables from JSON to Outsystems

Create a server action and call "JSON2RecordList" action, as can be seen in the picture below as a sample.


Fill the input parameter "JSON" with the JSON to transform and the parameter "RecordList" with ToObject() function with the variable to transform inside.


See below an example


Example of a structure used

As a result of this transformation now you have the variables in a format to be read by the Outsystems platform.


How to use the "JSONSelect" action

The next steps will guide you on how to use this component. In the end, you should have an action that allows simple path selection of an element in the JSON.


1. Create the dependencies that allow the usage of the component

The action JSONSelect is used to retrieve a path from a JSON.


To use it, add a dependency in your application according to the picture below.


2. Create a flow to retrieve the path of a JSON

Create a server action and call "JSONSelect" action, as can be seen in the picture below as a sample.

Fill the input parameter "JSONIn" with the JSON to process and the parameter "Path" with the path to retrieve.

You optionally enable set the "AlwaysReturnAsJSON" parameter to true to force the result to always be a valid JSON.
If set to false (default value), when the path string parse will result in a single element, instead of returning the result inclosed in double quotes (valid JSON), the result will not include the enclosing quotes.

Path expresions:

  • $    the root object/element
  • @    the current object/element
  • . or []    child operator
  • ..    recursive descent. JSONPath borrows this syntax from E4X.
  • *    wildcard. All objects/elements regardless of their names.
  • []    subscript operator. XPath uses it to iterate over element collections and for predicates. In Javascript and JSON it is the native array operator.
  • [,]    Union operator in XPath results in a combination of node sets. JSONPath allows alternate names or array indices as a set.
  • [start:end:step]    array slice operator borrowed from ES4.
  • ?()    applies a filter (script) expression.
  • ()    script expression, using the underlying script engine.

See: JSONPath expressions - https://goessner.net/

See below an example



As the result of this transformation now you only have the JSON path selected.


How to use the "JSON_Listify" action

The next steps will guide you on how to use this component. In the end, you should have an action that allows the replacement of the original JSON into a JSON representation list of key/value pairs. It can be the entire JSON or just a portion specified by the Path.


1. Create the dependencies that allow the usage of the component

The action "JSON_Listify" is used to replace JSON attributes into a key/value JSON objects object in the resulting JSON. 

It can be the entire JSON or just a portion specified by the Path.


To use it, add a dependency in your application according to the picture below.


2. Create a flow to retrieve the path of a JSON

Create a server action and call the "JSON_Listify" action, as can be seen in the picture below as a sample.


Fill the input parameter "JSONIn" with the JSON to process and the parameter "Path" with the path to retrieve ( for the Path expressions please refer to the "JSONSelect" documentation).


See below an example 


As the result of this transformation now you only have the original JSON with the attributes replaced as  "key/value" objects for the path selected.


How to use the "JSON_Objectify" action

The next steps will guide you on how to use this component. In the end, you should have an action that allows the replacement of the key/value attributes of the original JSON into JSON objects from those attributes. It can be the entire JSON or just a portion specified by the Path.


1. Create the dependencies that allow the usage of the component

The action "JSON_Objectify" is used to replace attributes called key and value into a key/value object in the resulting JSON. 

It can be the entire JSON or just a portion specified by the Path. 


To use it, add a dependency in your application according to the picture below.

2. Create a flow to retrieve the path of a JSON

Create a server action and call the "JSON_Objectify" action, as can be seen in the picture below as a sample.

Fill the input parameter "JSONIn" with the JSON to process and the parameter "Path" with the path to retrieve ( for the Path expressions please refer to the "JSONSelect" documentation).


See below an example 

 

As the result of this transformation now you only have the original JSON with the attributes called "key" and "value" replaced as an object where the key is the object key, and the value is the object value for the path selected.



1.10.9

Instructions


How to use the "Outsystems2JSON" action

The next steps will guide you on how to use this component. In the end, you should have an action that serializes an OutSystems value to JSON.


1. Create the dependencies that allow the usage of the component

The action "Outsystems2JSON" is used to convert OutSystems variables to JSON and send it to external environments.

To use it, add a dependency in your application according to the picture below.



2. Create a flow to transform variables from Outsystems to JSON


Create a server action and call "Outsystems2JSON" action.


For simple and complex types:

Fill the input parameter "value" with the ToObject() function with the variable to transform inside.


See below an example


For Date, Datetime and Time:


Fill the input parameter "value" with the ToObject() function with the variable to transform inside. and choose a value between 0 and 3 for the different date format types that are explained in the right comment of the image above.

See below an example

As a result of this transformation now you have the JSON ready to send it to external environments.


How to use the "JSON2Outsystems" action

The next steps will guide you on how to use this component. In the end, you should have an action that adds Records to a Record List containing the de-serialized JSON.


1. Create the dependencies that allow the usage of the component

The action JSON 2 RecordList is used to convert JSON into Outsystems variables in order to be readable in the Outsystems platform.


To use it, add a dependency in your application according to the picture below.



2. Create a flow to transform variables from JSON to Outsystems

Create a server action and call "JSON2RecordList" action, as can be seen in the picture below as a sample.


Fill the input parameter "JSON" with the JSON to transform and the parameter "RecordList" with ToObject() function with the variable to transform inside.


See below an example


Example of a structure used

As a result of this transformation now you have the variables in a format to be read by the Outsystems platform.


How to use the "JSONSelect" action

The next steps will guide you on how to use this component. In the end, you should have an action that allows simple path selection of an element in the JSON.


1. Create the dependencies that allow the usage of the component

The action JSONSelect is used to retrieve a path from a JSON.


To use it, add a dependency in your application according to the picture below.


2. Create a flow to retrieve the path of a JSON

Create a server action and call "JSONSelect" action, as can be seen in the picture below as a sample.

Fill the input parameter "JSONIn" with the JSON to process and the parameter "Path" with the path to retrieve.

You optionally enable set the "AlwaysReturnAsJSON" parameter to true to force the result to always be a valid JSON.
If set to false (default value), when the path string parse will result in a single element, instead of returning the result inclosed in double quotes (valid JSON), the result will not include the enclosing quotes.

Path expresions:

  • $    the root object/element
  • @    the current object/element
  • . or []    child operator
  • ..    recursive descent. JSONPath borrows this syntax from E4X.
  • *    wildcard. All objects/elements regardless of their names.
  • []    subscript operator. XPath uses it to iterate over element collections and for predicates. In Javascript and JSON it is the native array operator.
  • [,]    Union operator in XPath results in a combination of node sets. JSONPath allows alternate names or array indices as a set.
  • [start:end:step]    array slice operator borrowed from ES4.
  • ?()    applies a filter (script) expression.
  • ()    script expression, using the underlying script engine.

 See: JSONPath expressions - https://goessner.net/

See below an example



As the result of this transformation now you only have the JSON path selected.


How to use the "JSON_Listify" action

The next steps will guide you on how to use this component. In the end, you should have an action that allows the replacement of the original JSON into a JSON representation list of key/value pairs. It can be the entire JSON or just a portion specified by the Path.


1. Create the dependencies that allow the usage of the component

The action "JSON_Listify" is used to replace JSON attributes into a key/value JSON objects object in the resulting JSON. 

It can be the entire JSON or just a portion specified by the Path.


To use it, add a dependency in your application according to the picture below.


2. Create a flow to retrieve the path of a JSON

Create a server action and call the "JSON_Listify" action, as can be seen in the picture below as a sample.


Fill the input parameter "JSONIn" with the JSON to process and the parameter "Path" with the path to retrieve ( for the Path expressions please refer to the "JSONSelect" documentation).


See below an example 


As the result of this transformation now you only have the original JSON with the attributes replaced as  "key/value" objects for the path selected.


How to use the "JSON_Objectify" action

The next steps will guide you on how to use this component. In the end, you should have an action that allows the replacement of the key/value attributes of the original JSON into JSON objects from those attributes. It can be the entire JSON or just a portion specified by the Path.


1. Create the dependencies that allow the usage of the component

The action "JSON_Objectify" is used to replace attributes called key and value into a key/value object in the resulting JSON. 

It can be the entire JSON or just a portion specified by the Path. 


To use it, add a dependency in your application according to the picture below.

2. Create a flow to retrieve the path of a JSON

Create a server action and call the "JSON_Objectify" action, as can be seen in the picture below as a sample.

Fill the input parameter "JSONIn" with the JSON to process and the parameter "Path" with the path to retrieve ( for the Path expressions please refer to the "JSONSelect" documentation).


See below an example 

 

As the result of this transformation now you only have the original JSON with the attributes called "key" and "value" replaced as an object where the key is the object key, and the value is the object value for the path selected.


1.10.8

Instructions


How to use the "Outsystems2JSON" action

The next steps will guide you on how to use this component. In the end, you should have an action that serializes an OutSystems value to JSON.


1. Create the dependencies that allow the usage of the component

The action "Outsystems2JSON" is used to convert OutSystems variables to JSON and send it to external environments.

To use it, add a dependency in your application according to the picture below.



2. Create a flow to transform variables from Outsystems to JSON


Create a server action and call "Outsystems2JSON" action.


For simple and complex types:

Fill the input parameter "value" with the ToObject() function with the variable to transform inside.


See below an example


For Date, Datetime and Time:


Fill the input parameter "value" with the ToObject() function with the variable to transform inside. and choose a value between 0 and 3 for the different date format types that are explained in the right comment of the image above.

See below an example

As a result of this transformation now you have the JSON ready to send it to external environments.


How to use the "JSON2Outsystems" action

The next steps will guide you on how to use this component. In the end, you should have an action that adds Records to a Record List containing the de-serialized JSON.


1. Create the dependencies that allow the usage of the component

The action JSON 2 RecordList is used to convert JSON into Outsystems variables in order to be readable in the Outsystems platform.


To use it, add a dependency in your application according to the picture below.



2. Create a flow to transform variables from JSON to Outsystems

Create a server action and call "JSON2RecordList" action, as can be seen in the picture below as a sample.


Fill the input parameter "JSON" with the JSON to transform and the parameter "RecordList" with ToObject() function with the variable to transform inside.


See below an example


Example of a structure used

As a result of this transformation now you have the variables in a format to be read by the Outsystems platform.


How to use the "JSONSelect" action

The next steps will guide you on how to use this component. In the end, you should have an action that allows simple path selection of an element in the JSON.


1. Create the dependencies that allow the usage of the component

The action JSONSelect is used to retrieve a path from a JSON.


To use it, add a dependency in your application according to the picture below.


2. Create a flow to retrieve the path of a JSON

Create a server action and call "JSONSelect" action, as can be seen in the picture below as a sample.

Fill the input parameter "JSONIn" with the JSON to process and the parameter "Path" with the path to retrieve.

You optionally enable set the "AlwaysReturnAsJSON" parameter to true to force the result to always be a valid JSON.
If set to false (default value), when the path string parse will result in a single element, instead of returning the result inclosed in double quotes (valid JSON), the result will not include the enclosing quotes.

Path expresions:

  • $    the root object/element
  • @    the current object/element
  • . or []    child operator
  • ..    recursive descent. JSONPath borrows this syntax from E4X.
  • *    wildcard. All objects/elements regardless of their names.
  • []    subscript operator. XPath uses it to iterate over element collections and for predicates. In Javascript and JSON it is the native array operator.
  • [,]    Union operator in XPath results in a combination of node sets. JSONPath allows alternate names or array indices as a set.
  • [start:end:step]    array slice operator borrowed from ES4.
  • ?()    applies a filter (script) expression.
  • ()    script expression, using the underlying script engine.

 See: JSONPath expressions - https://goessner.net/

See below an example



As the result of this transformation now you only have the JSON path selected.


How to use the "JSON_Listify" action

The next steps will guide you on how to use this component. In the end, you should have an action that allows the replacement of the original JSON into a JSON representation list of key/value pairs. It can be the entire JSON or just a portion specified by the Path.


1. Create the dependencies that allow the usage of the component

The action "JSON_Listify" is used to replace JSON attributes into a key/value JSON objects object in the resulting JSON. 

It can be the entire JSON or just a portion specified by the Path.


To use it, add a dependency in your application according to the picture below.


2. Create a flow to retrieve the path of a JSON

Create a server action and call the "JSON_Listify" action, as can be seen in the picture below as a sample.


Fill the input parameter "JSONIn" with the JSON to process and the parameter "Path" with the path to retrieve ( for the Path expressions please refer to the "JSONSelect" documentation).


See below an example 


As the result of this transformation now you only have the original JSON with the attributes replaced as  "key/value" objects for the path selected.


How to use the "JSON_Objectify" action

The next steps will guide you on how to use this component. In the end, you should have an action that allows the replacement of the key/value attributes of the original JSON into JSON objects from those attributes. It can be the entire JSON or just a portion specified by the Path.


1. Create the dependencies that allow the usage of the component

The action "JSON_Objectify" is used to replace attributes called key and value into a key/value object in the resulting JSON. 

It can be the entire JSON or just a portion specified by the Path. 


To use it, add a dependency in your application according to the picture below.

2. Create a flow to retrieve the path of a JSON

Create a server action and call the "JSON_Objectify" action, as can be seen in the picture below as a sample.

Fill the input parameter "JSONIn" with the JSON to process and the parameter "Path" with the path to retrieve ( for the Path expressions please refer to the "JSONSelect" documentation).


See below an example 

 

As the result of this transformation now you only have the original JSON with the attributes called "key" and "value" replaced as an object where the key is the object key, and the value is the object value for the path selected.