JSON
JSON functions in Macrometa stream workers provide developers with an extensive toolkit for processing and manipulating JSON data within stream worker queries. These functions empower you to extract, transform, and analyze JSON data, enabling you to unlock insights and create efficient stream processing workflows tailored to your application's needs.
This section, describes various JSON functions and their usage, allowing you to harness their full potential for an enhanced data processing experience.
📄️ getBool (Function)
Function retrieves the boolean value specified in the given path of the JSON element.
📄️ getDouble (Function)
Function retrieves the double value specified in the given path of the JSON element.
📄️ getFloat (Function)
Function retrieves the float value specified in the given path of the JSON element.
📄️ getInt (Function)
Function retrieves the int value specified in the given path of the JSON element.
📄️ getLong (Function)
Function retrieves the long value specified in the given path of the JSON element.
📄️ getObject (Function)
Function retrieves the object specified in the given path of the JSON element.
📄️ getString (Function)
Function retrieves value specified in the given path of the JSON element as a string.
📄️ group (Aggregate Function)
This function aggregates the JSON elements and returns a JSON object by adding enclosing.element if it is provided. If enclosing.element is not provided, then it aggregate the JSON elements returns a JSON array.
📄️ groupAsObject (Aggregate Function)
This function aggregates the JSON elements and returns a JSON object by adding enclosing.element if it is provided. If enclosing.element is not provided, then it aggregate the JSON elements returns a JSON array.
📄️ isExists (Function)
Function checks whether there is a JSON element present in the given path or not.
📄️ setElement (Function)
Function sets JSON element into a given JSON at the specific path.
📄️ toObject (Function)
Function generate JSON object from the given JSON string.
📄️ tokenize (Stream Processor)
Stream processor tokenizes the given JSON into to multiple JSON string elements and sends them as separate events.
📄️ tokenizeAsObject (Stream Processor)
Stream processor tokenizes the given JSON into to multiple JSON object elements and sends them as separate events.
📄️ toString (Function)
Function generates a JSON string corresponding to a given JSON object.