AWS IoT for ESP32 v1.0.0
An ESP-IDF based solution
lib_json.h File Reference

JSON library header file. More...

Go to the source code of this file.

Data Structures

struct  tagStructure_st
 A structure to represent key-value pairs in a JSON string. More...
 
struct  jsonArray_st
 A structure to represent array of JSON objects. More...
 

Functions

bool JSON_processString (const char *pJsonStr, const tagStructure_st tags[], uint8_t maxKeys_u8)
 Extract the key-value pairs sepcified by tags from a give JSON string. More...
 
uint8_t JSON_processArrayObjs (char *pJsonStr, jsonArray_st *jsnArrPtr)
 Extract an array of JSON objects from given JSON string. More...
 

Detailed Description

JSON library header file.

Function Documentation

◆ JSON_processArrayObjs()

uint8_t JSON_processArrayObjs ( char *  pJsonStr,
jsonArray_st jsnArrPtr 
)

Extract an array of JSON objects from given JSON string.

Parameters
[in]pJsonStrThe JSON strong
[in,out]jsnArrPtrAn array of JSON objects
Returns
Status of extraction
Return values
trueon success
falseon failure

◆ JSON_processString()

bool JSON_processString ( const char *  pJsonStr,
const tagStructure_st  tags[],
uint8_t  maxKeys_u8 
)

Extract the key-value pairs sepcified by tags from a give JSON string.

Parameters
[in]pJsonStrThe JSON string
[in,out]tagsAn array of key-value pairs to be extracted
[in]maxKeys_u8The maximum number of keys to be extracted
Returns
Status of extraction
Return values
trueon success
falseon failure