|
Nyx Node
|

Topics | |
| JSON Null Object | |
| JSON Number Object | |
| JSON Boolean Object | |
| JSON String Object | |
| JSON Dict Object | |
| JSON List Object | |
Classes | |
| struct | nyx_object_t |
| Struct describing a JSON object. More... | |
Macros | |
| #define | NYX_OBJECT_MAGIC UINT32_C(0x65656500) |
| Magic number for identifying JSON objects. | |
Enumerations | |
| enum | nyx_type_t { NYX_TYPE_NULL = NYX_OBJECT_MAGIC | 0 , NYX_TYPE_BOOLEAN = NYX_OBJECT_MAGIC | 1 , NYX_TYPE_NUMBER = NYX_OBJECT_MAGIC | 2 , NYX_TYPE_STRING = NYX_OBJECT_MAGIC | 3 , NYX_TYPE_DICT = NYX_OBJECT_MAGIC | 4 , NYX_TYPE_LIST = NYX_OBJECT_MAGIC | 5 } |
| 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. | |
| __NYX_NULLABLE__ nyx_object_t * | nyx_object_t::nyx_object_ref (__NYX_NULLABLE__ void *object) |
| Increments the reference counter of the provided JSON object. | |
| __NYX_NULLABLE__ nyx_object_t * | nyx_object_t::nyx_object_unref (__NYX_NULLABLE__ void *object) |
| Decrements the reference counter of the provided JSON object and frees it when it reaches zero. | |
| nyx_type_t | nyx_object_t::nyx_object_get_type (__NYX_NULLABLE__ const nyx_object_t *object) |
| Gets the type of the provided JSON object. | |
| bool | nyx_object_t::nyx_object_notify (__NYX_NULLABLE__ const nyx_object_t *object) |
| Notifies the provided Nyx / INDI object to the clients. | |
| 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 the 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.
| struct nyx_object_t |
Struct describing a JSON object.
Public Member Functions | |
| __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. | |
| __NYX_NULLABLE__ nyx_object_t * | nyx_object_parse (__NYX_NULLABLE__ STR_t string) |
| Parses a JSON object from a C string. | |
| __NYX_NULLABLE__ nyx_object_t * | nyx_object_ref (__NYX_NULLABLE__ void *object) |
| Increments the reference counter of the provided JSON object. | |
| __NYX_NULLABLE__ nyx_object_t * | nyx_object_unref (__NYX_NULLABLE__ void *object) |
| Decrements the reference counter of the provided JSON object and frees it when it reaches zero. | |
| nyx_type_t | nyx_object_get_type (__NYX_NULLABLE__ const nyx_object_t *object) |
| Gets the type of the provided JSON object. | |
| bool | nyx_object_notify (__NYX_NULLABLE__ const nyx_object_t *object) |
| Notifies the provided Nyx / INDI object to the clients. | |
| bool | 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_to_string (__NYX_NULLABLE__ const nyx_object_t *object) |
| Returns a string, with the special character escaping, representing the provided 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. | |
| 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 432 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. |
| __NYX_NULLABLE__ nyx_object_t * nyx_object_ref | ( | __NYX_NULLABLE__ void * | object | ) |
Increments the reference counter of the provided JSON object.
| object | JSON object. |
| __NYX_NULLABLE__ nyx_object_t * nyx_object_unref | ( | __NYX_NULLABLE__ void * | object | ) |
Decrements the reference counter of the provided JSON object and frees it when it reaches zero.
| object | JSON object. |
| nyx_type_t nyx_object_get_type | ( | __NYX_NULLABLE__ const nyx_object_t * | object | ) |
Gets the type of the provided JSON object.
| object | JSON object. |
| bool nyx_object_notify | ( | __NYX_NULLABLE__ const nyx_object_t * | object | ) |
Notifies the provided Nyx / INDI object to the clients.
| object | The provided Nyx / INDI 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. |
| str_t nyx_object_to_string | ( | __NYX_NULLABLE__ const nyx_object_t * | object | ) |
Returns a string, with the 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. |