Comment on page
Example
This example demonstrates how to use the Transformation to serialize multiple sensor attributes into one JSON attribute.
Drag the JSON Serializer Transformation Agent onto the canvas, link the input endpoint to the sensor readings and the output to the printer. Rename the Agent and save the Data Stream.

Select the Agent and click Configure. In this case, keep the default Collection.

Specify the input, date/time format and how the results are returned.
In this case, tick to select all the input colums, set the DateTime format to "MM/dd/yyyy".
Keep the default JArray output and results returned.

Apply the changes, save the Data Stream, and publish it.

Let's look at the Live Data View. Observe that a new property, JSON, was appended to the incoming events. It contains the serialized input properties.

File | Link | Security Key |
---|---|---|
Data Stream | JSON Serializer Example.xuc | C0mp|ex123 |
Last modified 5mo ago