Json To Cloud Objects
Transform a JSON to an instance of the related Business Model
Description
Transform a JSON to an instance of the related Data type and persist it if was selected.
The properties of the provided JSON are used as properties of the instance of the data type.
In the case where the JSON includes child objects, it attempts to instantiate those as well and creates the corresponding relations (see Cloud Objects to JSON).
Example
JSONToCloudObject({"Latitude":15,"Longitude":25,"name":"GPS Coordinate"}, GPS Coordinate) ->`GPS Coordinate` object.
JSONToCloudObject( [ { "Latitude":15, "Longitude": 25, "name": "GPS Coordinate"}, { "Latitude": 13, "Longitude": 22, " name" : "GPS Coordinate" } ] , GPS Coordinate) ->List of `GPS Coordinate` objects.
Inputs
- Control Flow (Control Flow)
- source (Object): JSON object or string (Can be an array of objects)
- data type (Type): The target data type
- persist (Boolean): Indicates if the instance should be persisted, default: false
Outputs
- Control Flow (Control Flow)
- Error Flow (Error Flow): Triggered by providing incorrect json
- cloud objects (Object): Instance or List of Cloud Object with the related Business Model