cJSON Demo
Overview
After starting this application, perform the following actions:
Create cJSON root node
Add strings, numbers, and other content to the root node
Create a leaf node, add strings, numbers, and other content to the leaf node, and then add the leaf node to the root node after completion
Create leaf nodes, add arrays to leaf nodes, and add leaf nodes to the root node after completion
Add True, NULL and other objects to the root node
Convert the root node into a string and print it
Release the root node
Building and Flashing
Example Location: examples/storage/cjson
For operations such as compiling and burning, please refer to: Quick Start Guide
Running Result
Upon successful execution, the following logs will be output.
I/cjson_example [0.004] start cJSON demo...
{
"Name": "Jack",
"Age": 28,
"Weight": 68,
"Information": {
"Company": "WinnerMicro",
"Department": "SoftwareDepartment",
"Number": 8
},
"Score": [18, 20, 23, 25],
"IsMan": true,
"Other": null
}