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
compile, burn, and more, see: get started
Running result
Successfully running will output the following logs
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
}