|
JsoNeat
Some JSON parse/iterate C++ classes build on top of Jsmn
|
Serialize objects to JSON using char array buffers. For smaller objects which fit into such a buffer. More...
Functions | |
| int | to_json_val (char *dst, size_t dst_size, bool val) |
| Print value of a JSON key/value pair and append trailing comma. | |
| int | to_json_val (char *dst, size_t dst_size, int val) |
| Print value of a JSON key/value pair and append trailing comma. | |
| int | to_json_val (char *dst, size_t dst_size, long val) |
| Print value of a JSON key/value pair and append trailing comma. | |
| int | to_json_val (char *dst, size_t dst_size, long long val) |
| Print value of a JSON key/value pair and append trailing comma. | |
| int | to_json_val (char *dst, size_t dst_size, unsigned val) |
| Print value of a JSON key/value pair and append trailing comma. | |
| int | to_json_val (char *dst, size_t dst_size, float val) |
| Print value of a JSON key/value pair and append trailing comma. | |
| template<size_t SIZE> | |
| int | to_json_val (char *dst, size_t dst_size, const char(&val)[SIZE]) |
| Print value of a JSON key/value pair and append trailing comma. | |
| template<class C , typename std::enable_if< std::is_class_v< C > >::type * = nullptr> | |
| int | to_json_val (char *dst, size_t dst_size, const C &val, bool append_comma=true) |
| Print value of a JSON key/value pair and append trailing comma. | |
| template<typename T , size_t SIZE> | |
| int | to_json_val (char *dst, size_t dst_size, const std::array< T, SIZE > &val, bool append_comma=true) |
| Print value of a JSON key/value pair and append trailing comma. | |
| template<typename T , size_t SIZE> | |
| int | to_json_val (char *dst, size_t dst_size, const T(&val)[SIZE], bool append_comma=true) |
| Print value of a JSON key/value pair and append trailing comma. | |
| template<class T > | |
| int | to_json_kvp (char *dst, size_t dst_size, const jsoneat::KvPair< T > kvp) |
| Print key and value of a JSON key/value pair and append trailing comma. | |
| template<size_t SIZE> | |
| int | to_json_kvp (char *dst, size_t dst_size, const jsoneat::KvPair< char[SIZE]> kvp) |
| Print key and value of a JSON key/value pair and append trailing comma. | |
| template<typename T , typename ... Args> | |
| int | to_json_args (char *dst, size_t dst_size, const T &pair, Args ... args) |
Serialize objects to JSON using char array buffers. For smaller objects which fit into such a buffer.
| int jsoneat::to_json::cbuf::to_json_args | ( | char * | dst, |
| size_t | dst_size, | ||
| const T & | pair, | ||
| Args ... | args | ||
| ) |
| T | Prints an argument-list of key/value pairs as JSON |
| Args | list of types which should each be an instance of struct template jsoneat::KvPair |
| dst | output buffer |
| dst_size | output buffer size |
| pair | First key/value pair in argument list |
| args | Rest of argument list |
| int jsoneat::to_json::cbuf::to_json_kvp | ( | char * | dst, |
| size_t | dst_size, | ||
| const jsoneat::KvPair< char[SIZE]> | kvp | ||
| ) |
Print key and value of a JSON key/value pair and append trailing comma.
| dst | output buffer |
| dst_size | output buffer size |
| kvp | input key/value pair. Value is C style char array. |
| int jsoneat::to_json::cbuf::to_json_kvp | ( | char * | dst, |
| size_t | dst_size, | ||
| const jsoneat::KvPair< T > | kvp | ||
| ) |
Print key and value of a JSON key/value pair and append trailing comma.
| dst | output buffer |
| dst_size | output buffer size |
| kvp | input key/value pair |
|
inline |
Print value of a JSON key/value pair and append trailing comma.
| dst | output buffer |
| dst_size | output buffer size |
| val | input value |
| int jsoneat::to_json::cbuf::to_json_val | ( | char * | dst, |
| size_t | dst_size, | ||
| const C & | val, | ||
| bool | append_comma = true |
||
| ) |
Print value of a JSON key/value pair and append trailing comma.
| dst | output buffer |
| dst_size | output buffer size |
| val | input value, which is an object |
| int jsoneat::to_json::cbuf::to_json_val | ( | char * | dst, |
| size_t | dst_size, | ||
| const char(&) | val[SIZE] | ||
| ) |
Print value of a JSON key/value pair and append trailing comma.
| dst | output buffer |
| dst_size | output buffer size |
| val | input value |
| int jsoneat::to_json::cbuf::to_json_val | ( | char * | dst, |
| size_t | dst_size, | ||
| const std::array< T, SIZE > & | val, | ||
| bool | append_comma = true |
||
| ) |
Print value of a JSON key/value pair and append trailing comma.
| dst | output buffer |
| dst_size | output buffer size |
| val | input value, which is a std::array |
| int jsoneat::to_json::cbuf::to_json_val | ( | char * | dst, |
| size_t | dst_size, | ||
| const T(&) | val[SIZE], | ||
| bool | append_comma = true |
||
| ) |
Print value of a JSON key/value pair and append trailing comma.
| dst | output buffer |
| dst_size | output buffer size |
| val | input value, which is a C style array |
|
inline |
Print value of a JSON key/value pair and append trailing comma.
| dst | output buffer |
| dst_size | output buffer size |
| val | input value |
|
inline |
Print value of a JSON key/value pair and append trailing comma.
| dst | output buffer |
| dst_size | output buffer size |
| val | input value |
|
inline |
Print value of a JSON key/value pair and append trailing comma.
| dst | output buffer |
| dst_size | output buffer size |
| val | input value |
|
inline |
Print value of a JSON key/value pair and append trailing comma.
| dst | output buffer |
| dst_size | output buffer size |
| val | input value |
|
inline |
Print value of a JSON key/value pair and append trailing comma.
| dst | output buffer |
| dst_size | output buffer size |
| val | input value |