The siddhi-execution-json extension is an extension to Siddhi that provides a rich set of capabilities to retrieve data from JSONs and inserting/modifying elements in JSONs using Siddhi streams.
Find some useful links below:
Latest API Docs is 1.0.9.
Using the extension in WSO2 Stream Processor
-
You can use this extension in the latest WSO2 Stream Processor that is a part of WSO2 Analytics offering, with editor, debugger and simulation support.
-
This extension is shipped by default with WSO2 Stream Processor, if you wish to use an alternative version of this extension you can replace the component jar that can be found in the
<STREAM_PROCESSOR_HOME>/lib
directory.
Using the extension as a java library
- This extension can be added as a maven dependency along with other Siddhi dependencies to your project.
<dependency>
<groupId>org.wso2.extension.siddhi.execution.json</groupId>
<artifactId>siddhi-execution-json</artifactId>
<version>x.x.x</version>
</dependency>
Branch | Build Status |
---|---|
master |
- getBool (Function)
This method will return the Boolean value of Json element corresponding to the given path. If there is no valid Boolean value at the given path, the method will return 'false'
- getDouble (Function)
This method will return the double value of Json element corresponding to the given path. If there is no valid Double value at the given path, the method will return 'null'
- getFloat (Function)
This method will return the Float value of the Json element corresponding to the given path. If there is no valid Float value at the given path, the method will return 'null'
- getInt (Function)
This method will return the Integer value of Json element corresponding to the given path. If there is no valid Integer value at the given path, the method will return 'null'
- getLong (Function)
This method will return the Long value of the Json element corresponding to the given path. Ifthere is no valid Long value at the given path, the method will return 'null'
- getObject (Function)
This method will return the object of Json element corresponding to the given path.
- getString (Function)
This method will return the string value of Json element corresponding to the given path.
- isExists (Function)
This method allows to check whether there is any json element in the given path or not. If there is a valid json element in the given path, it will return true. If there is no valid json element, it will return false
- setElement (Function)
This method allows to insert elements to the given json based on the specified path. If there is no valid path given, it will return the original json. Otherwise it will return the new json
- toObject (Function)
This method will return the json object related to given json string.
- toString (Function)
This method will return the json string related to given json object.
- tokenize (Stream Processor)
This tokenizes the given json according the path provided
- tokenizeAsObject (Stream Processor)
This tokenizes the given json based on the path provided and returns the response as an object.
-
Please report issues at GitHub Issue Tracker.
-
Send your contributions as pull requests to master branch.
-
Post your questions with the "Siddhi" tag in Stackoverflow.
-
Siddhi developers can be contacted via the mailing lists:
Developers List : dev@wso2.org
Architecture List : architecture@wso2.org
-
We are committed to ensuring support for this extension in production. Our unique approach ensures that all support leverages our open development methodology and is provided by the very same engineers who build the technology.
-
For more details and to take advantage of this unique opportunity contact us via http://wso2.com/support/.