|
#define | NYX_OBJECT_MAGIC 0x65656565U |
| Magic number for identifying JSON objects.
|
|
#define | NYX_FLAGS_DISABLED ((uint64_t) 0x0000000000000001U) |
| Flag indicating that the object is disabled.
|
|
#define | NYX_FLAGS_BLOB_MASK ((uint64_t) 0x00000001FFFFFFFCU) |
| Mask indicating the Nyx blob emission per client.
|
|
#define | NYX_FLAGS_STREAM_MASK ((uint64_t) 0xFFFFFFFE00000000U) |
| Mask indicating the Nyx stream emission per client.
|
|
JSON serialization / deserialization.
◆ 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.
|
◆ nyx_object_parse_buff()
nyx_object_t * nyx_object_parse_buff |
( |
__ZEROABLE__ size_t | size, |
|
|
__NULLABLE__ BUFF_t | buff ) |
Parses a JSON object from a string buffer.
- Parameters
-
size | The string size. |
buff | The string pointer. |
- Returns
- The new JSON object.
◆ nyx_object_parse()
__NULLABLE__ nyx_object_t * nyx_object_parse |
( |
__NULLABLE__ STR_t | text | ) |
|
Parses a JSON object from a string.
- Parameters
-
- Returns
- The new JSON object.
◆ nyx_object_free()
Frees memory of the provided JSON object.
- Parameters
-
object | The provided JSON document. |
◆ nyx_object_equal()
Compares two JSON objects.
- Parameters
-
object1 | The first JSON object. |
object2 | The second JSON object. |
- Returns
true
if the objects are equal, and false
if not.
◆ nyx_object_to_string()
str_t nyx_object_to_string |
( |
__NULLABLE__ const nyx_object_t * | object | ) |
|
Returns a string representing the provided object.
- Parameters
-
object | The provided object. |
- Returns
- The string representing the provided object.
◆ nyx_object_to_cstring()
str_t nyx_object_to_cstring |
( |
__NULLABLE__ const nyx_object_t * | object | ) |
|
Returns a C/C++ string representing the provided object.
- Parameters
-
object | The provided object. |
- Returns
- The string representing the provided object.