|
Nyx Node
|

Modules | |
| JSON Null Object | |
| JSON Number Object | |
| JSON Boolean Object | |
| JSON String Object | |
| JSON Dict Object | |
| JSON List Object | |
Data Structures | |
| struct | nyx_object_t |
| Struct describing a JSON object. More... | |
Macros | |
| #define | NYX_OBJECT_MAGIC UINT32_C(0x65656565) |
| Magic number for identifying JSON objects. | |
| #define | NYX_FLAGS_DISABLED UINT64_C(0x0000000000000001) |
| #define | NYX_FLAGS_BLOB_MASK UINT64_C(0x00000001FFFFFFFC) |
| #define | NYX_FLAGS_STREAM_MASK UINT64_C(0xFFFFFFFE00000000) |
Typedefs | |
| typedef struct nyx_object_s | nyx_object_t |
Enumerations | |
| enum | nyx_type_t { NYX_TYPE_NULL = 200 , NYX_TYPE_BOOLEAN = 201 , NYX_TYPE_NUMBER = 202 , NYX_TYPE_STRING = 203 , NYX_TYPE_DICT = 204 , NYX_TYPE_LIST = 205 } |
| JSON object types. More... | |
Functions | |
| __NYX_NULLABLE__ nyx_object_t * | nyx_object_t::nyx_object_parse_buff (__NYX_ZEROABLE__ size_t size, __NYX_NULLABLE__ BUFF_t buff) |
| Parses a JSON object from a string buffer. | |
| __NYX_NULLABLE__ nyx_object_t * | nyx_object_t::nyx_object_parse (__NYX_NULLABLE__ STR_t string) |
| Parses a JSON object from a C string. | |
| void | nyx_object_t::nyx_object_free (__NYX_NULLABLE__ nyx_object_t *object) |
| Frees memory of the provided JSON object. | |
| bool | nyx_object_t::nyx_object_equal (__NYX_NULLABLE__ const nyx_object_t *object1, __NYX_NULLABLE__ const nyx_object_t *object2) |
| Compares two JSON objects. | |
| str_t | nyx_object_t::nyx_object_to_string (__NYX_NULLABLE__ const nyx_object_t *object) |
| Returns a string, with special character escaping, representing the provided JSON object. | |
| str_t | nyx_object_t::nyx_object_to_cstring (__NYX_NULLABLE__ const nyx_object_t *object) |
| Returns a C string, without special character escaping, representing the provided JSON object. | |
JSON serialization / deserialization.
| #define NYX_OBJECT_MAGIC UINT32_C(0x65656565) |
Magic number for identifying JSON objects.
Definition at line 401 of file nyx_node.h.
| #define NYX_FLAGS_DISABLED UINT64_C(0x0000000000000001) |
Definition at line 405 of file nyx_node.h.
| #define NYX_FLAGS_BLOB_MASK UINT64_C(0x00000001FFFFFFFC) |
Definition at line 408 of file nyx_node.h.
| #define NYX_FLAGS_STREAM_MASK UINT64_C(0xFFFFFFFE00000000) |
Definition at line 411 of file nyx_node.h.
| enum nyx_type_t |
JSON object types.
| Enumerator | |
|---|---|
| NYX_TYPE_NULL | Null object. |
| NYX_TYPE_BOOLEAN | Boolean object. |
| NYX_TYPE_NUMBER | Number object. |
| NYX_TYPE_STRING | String object. |
| NYX_TYPE_DICT | Dict object. |
| NYX_TYPE_LIST | List object. |
Definition at line 420 of file nyx_node.h.
| __NYX_NULLABLE__ nyx_object_t * nyx_object_parse_buff | ( | __NYX_ZEROABLE__ size_t | size, |
| __NYX_NULLABLE__ BUFF_t | buff | ||
| ) |
Parses a JSON object from a string buffer.
| size | String size. |
| buff | String pointer. |
| __NYX_NULLABLE__ nyx_object_t * nyx_object_parse | ( | __NYX_NULLABLE__ STR_t | string | ) |
Parses a JSON object from a C string.
| string | C string. |
| void nyx_object_free | ( | __NYX_NULLABLE__ nyx_object_t * | object | ) |
Frees memory of the provided JSON object.
| object | JSON object. |
| bool nyx_object_equal | ( | __NYX_NULLABLE__ const nyx_object_t * | object1, |
| __NYX_NULLABLE__ const nyx_object_t * | object2 | ||
| ) |
Compares two JSON objects.
| object1 | First JSON object. |
| object2 | Second JSON object. |
true if the objects are equal, false otherwise. | str_t nyx_object_to_string | ( | __NYX_NULLABLE__ const nyx_object_t * | object | ) |
Returns a string, with special character escaping, representing the provided JSON object.
| object | JSON object. |
| str_t nyx_object_to_cstring | ( | __NYX_NULLABLE__ const nyx_object_t * | object | ) |
Returns a C string, without special character escaping, representing the provided JSON object.
| object | JSON object. |