![]() |
cueOS
2.4
cueOS - Universal Show Control OS for ARM
|

Data Structures | |
| struct | json_parser_json_param_s |
| JSON parameter structure object. More... | |
| struct | json_parser_json_object_s |
| JSON Objects structure object. More... | |
| struct | json_parser_json_string_s |
| JSON String structure object. More... | |
Macros | |
| #define | JSON_ARRAY_DELIMITOR "[" |
| #define | JSON_ARRAY_TERMINATOR "]" |
| #define | JSON_STRING_DELIMITOR "{" |
| #define | JSON_STRING_TERMINATOR "}" |
| #define | JSON_STRING_ENTRY_DELIMITOR "\"" |
| #define | JSON_STRING_ENTRY_SEPARATOR ":" |
| #define | JSON_STRING_PAIR_SEPARATOR "," |
Functions | |
| void | json_parser_json_string_put_int_pair (json_parser_json_string_s *json_string, char *key, uint16_t val, uint8_t is_initial, uint8_t is_final) |
| Puts a JSON key/(integer)value pair into a provided json string object;. More... | |
| void | json_parser_json_string_put_str_pair (json_parser_json_string_s *json_string, char *key, char *val, uint8_t is_final, uint8_t is_initial) |
| Puts a JSON key/(string)value pair into a provided json string object;. More... | |
| void | json_parser_json_string_nest (json_parser_json_string_s *json_string, char *key, json_parser_json_string_s *nested_json_string, uint8_t is_initial, uint8_t is_final) |
| Nests a child JSON string into a parent JSON string. More... | |
| void | json_parser_json_string_put_array_object (json_parser_json_string_s *json_string, json_parser_json_string_s *json_object, uint8_t is_initial, uint8_t is_final) |
| Nests a child JSON string into a parent JSON array. More... | |
| void | json_parser_json_string_put_array_int (json_parser_json_string_s *json_string, uint16_t val, uint8_t is_initial, uint8_t is_final) |
| Nests a child JSON string into a parent JSON array. More... | |
| json_parser_json_object_s * | json_parser_parse (char *json_string, uint16_t json_string_len) |
| Retrieves key/value pairs from a JSON encoded string. More... | |
| json_parser_json_string_s * | json_parser_json_string_new (void) |
| Creates and initialises a new json string instance. More... | |
| void | json_parser_free_json_object (json_parser_json_object_s *json_object) |
| Frees a parsed json object. More... | |
| void | json_parser_free_json_string (json_parser_json_string_s *json_string) |
| Frees a json string instance. More... | |
Module dedicated to JSON parsing and JSON string formating.
| #define JSON_ARRAY_DELIMITOR "[" |
JSON string array delimitor
Definition at line 11 of file json_parser.h.
| #define JSON_ARRAY_TERMINATOR "]" |
JSON string array terminator
Definition at line 12 of file json_parser.h.
| #define JSON_STRING_DELIMITOR "{" |
JSON string object delimitor
Definition at line 13 of file json_parser.h.
| #define JSON_STRING_ENTRY_DELIMITOR "\"" |
JSON string entry delimitor
Definition at line 15 of file json_parser.h.
| #define JSON_STRING_ENTRY_SEPARATOR ":" |
JSON string entry delimitor
Definition at line 16 of file json_parser.h.
| #define JSON_STRING_PAIR_SEPARATOR "," |
JSON string pair delimitor
Definition at line 17 of file json_parser.h.
| #define JSON_STRING_TERMINATOR "}" |
JSON string object delimitor
Definition at line 14 of file json_parser.h.
| void json_parser_free_json_object | ( | json_parser_json_object_s * | json_object | ) |
Frees a parsed json object.
| *json_object | pointer to json object instance to be freed |
Definition at line 263 of file json_parser.c.
| void json_parser_free_json_string | ( | json_parser_json_string_s * | json_string | ) |
Frees a json string instance.
| *json_string | pointer to json string instance to be freed |
Definition at line 294 of file json_parser.c.
| void json_parser_json_string_nest | ( | json_parser_json_string_s * | json_string, |
| char * | key, | ||
| json_parser_json_string_s * | nested_json_string, | ||
| uint8_t | is_initial, | ||
| uint8_t | is_final | ||
| ) |
Nests a child JSON string into a parent JSON string.
| *json_string | pointer to a json string instance |
| *key | pointer to the JSON key string |
| *nested_json_string | pointer to the json string value to be nested and associated to the provided JSON key |
| is_initial | determines if a JSON string delimitor "{" should be prefixing the key/value pair. (the json string starts) |
| is_final | determines if a JSON string terminator "}\0" should be suffixing the key/value pair. (the json string stops) |
Definition at line 121 of file json_parser.c.
| json_parser_json_string_s * json_parser_json_string_new | ( | void | ) |
Creates and initialises a new json string instance.
Definition at line 282 of file json_parser.c.
| void json_parser_json_string_put_array_int | ( | json_parser_json_string_s * | json_string, |
| uint16_t | val, | ||
| uint8_t | is_initial, | ||
| uint8_t | is_final | ||
| ) |
Nests a child JSON string into a parent JSON array.
| *json_string | pointer to a json string instance (array) |
| val | integer value to put into the array |
| is_initial | determines if a JSON array delimitor "[" should be prefixing the key/value pair. (the json string starts) |
| is_final | determines if a JSON array terminator "]\0" should be suffixing the key/value pair. (the json string stops) |
Definition at line 177 of file json_parser.c.
| void json_parser_json_string_put_array_object | ( | json_parser_json_string_s * | json_string, |
| json_parser_json_string_s * | json_object, | ||
| uint8_t | is_initial, | ||
| uint8_t | is_final | ||
| ) |
Nests a child JSON string into a parent JSON array.
| *json_string | pointer to a json string instance (array) |
| *json_object | pointer to the json string value to be nested into the json array |
| is_initial | determines if a JSON array delimitor "[" should be prefixing the key/value pair. (the json string starts) |
| is_final | determines if a JSON array terminator "]\0" should be suffixing the key/value pair. (the json string stops) |
Definition at line 150 of file json_parser.c.
| void json_parser_json_string_put_int_pair | ( | json_parser_json_string_s * | json_string, |
| char * | key, | ||
| uint16_t | val, | ||
| uint8_t | is_initial, | ||
| uint8_t | is_final | ||
| ) |
Puts a JSON key/(integer)value pair into a provided json string object;.
| *json_string | pointer to a json string instance |
| *key | pointer to the JSON key string |
| val | integer value to be associated to the provided JSON key |
| is_initial | determines if a JSON string delimitor "{" should be prefixing the key/value pair. (the json string starts) |
| is_final | determines if a JSON string terminator "}\0" should be suffixing the key/value pair. (the json string stops) |
Definition at line 56 of file json_parser.c.
| void json_parser_json_string_put_str_pair | ( | json_parser_json_string_s * | json_string, |
| char * | key, | ||
| char * | val, | ||
| uint8_t | is_initial, | ||
| uint8_t | is_final | ||
| ) |
Puts a JSON key/(string)value pair into a provided json string object;.
| *json_string | pointer to a json string instance |
| *key | pointer to the JSON key string |
| *val | pointer to the string value to be associated to the provided JSON key |
| is_initial | determines if a JSON string delimitor "{" should be prefixing the key/value pair. (the json string starts) |
| is_final | determines if a JSON string terminator "}\0" should be suffixing the key/value pair. (the json string stops) |
Definition at line 89 of file json_parser.c.
| json_parser_json_object_s * json_parser_parse | ( | char * | json_string, |
| uint16_t | json_string_len | ||
| ) |
Retrieves key/value pairs from a JSON encoded string.
| *json_string | pointer to the JSON string to be parsed |
| json_string_len | length (in bytes) of the provided JSON string (HTTP content_length header value) |
Definition at line 207 of file json_parser.c.