ESP32 ESP-IDF and ESP8266 RTOS SDK component for json
Currently only a simple json is being created. Will be updated as needed.
Tested on
- ESP8266 RTOS_SDK v3.4
- ESP32 ESP-IDF v5.2
Using
In an existing project, run the following command to install the components:
cd ../your_project/components
git clone https://github.com/aZholtikov/zh_json.git
In the application, add the component:
#include "zh_json.h"
Example
Create json:
#include "stdio.h"
#include "zh_json.h"
void app_main(void)
{
zh_json_t json = {0};
zh_json_init(&json);
zh_json_add(&json, "Name 1", "Hello world!");
zh_json_add(&json, "Name 2", "true");
zh_json_add(&json, "Name 3", "255");
zh_json_add(&json, "Name 4", "123,456");
char buffer[128] = {0};
zh_json_create(&json, buffer);
printf("Json is: %s\n", buffer);
zh_json_free(&json);
}
Any feedback will be gladly accepted.
Description
Version 1.0.1
Latest
Languages
C
98.6%
CMake
1.4%