JSON has become a popular inter-process communication (IPC) data interchange format for a variety of computer languages. Our open source JSON library for Internet of Things (IoT) is optimized for resource constrained systems including bare metal microcontrollers. The library enables real time parsing of JSON objects on a data stream such as raw sockets. JSON is the fat free alternative to XML and is ideally suited for Machine to Machine communication.
The JSON parser is designed to parse data on a stream and provides for the detection of new JSON packets as they trickle in. Use of the JSON library is most beneficial for designs that implement a raw TCP/IP connection for streaming JSON packets. The JSON library does not require frame based packet management and works with a direct raw TCP/IP stream.
Use cases include, but are not limited to:
The JSON demo for Android is a bit tricky to download and run since you must run it from a command line shell such as from the Android ADB debugger shell. The following procedure shows how to run it via BusyBox, a free Android terminal.
You should see the following being printed in the terminal window after pasting the above command sequence into the shell.
Connecting to realtimelogic.com (184.108.40.206:80) m2mled 100% |*******************************| 58768 0:00:00 ETA Connecting to realtimelogic.info... Set LED from keyboard. Uppercase = ON, lowercase = OFF. Switching LED state updates UI in all connected browsers. Browse to: http://realtimelogic.info/IoT/led/json/ Set LED 1 on Set LED 2 on Set LED 3 on Set LED 4 on
The JSON library is typically used in memory constrained Edge Nodes together with the SMQ C library. The following video shows how you can setup your own low cost IoT cloud server by using the SMQ protocol.