|
Nyx Node
|

Classes | |
| struct | nyx_string_t |
| Struct describing a JSON string object. More... | |
Functions | |
| nyx_string_t * | nyx_string_t::nyx_string_new (void) |
| Allocates a new JSON string object. | |
| STR_t | nyx_string_t::nyx_string_get (const nyx_string_t *object) |
| Gets the text value of the provided JSON string object. | |
| void | nyx_string_t::nyx_string_get_buff (const nyx_string_t *object, __NYX_NULLABLE__ size_t *result_size, __NYX_NULLABLE__ buff_t *result_buff) |
| Gets the content of the provided JSON string object as a byte buffer. | |
| bool | nyx_string_t::nyx_string_set (nyx_string_t *object, STR_t value, bool managed) |
| Sets the text value of the provided JSON string object. | |
| bool | nyx_string_t::nyx_string_set_buff (nyx_string_t *object, size_t size, BUFF_t buff, bool managed) |
| Sets the content of the provided JSON string object from a byte buffer. | |
| size_t | nyx_string_t::nyx_string_length (const nyx_string_t *object) |
| Returns the number of content bytes of the provided JSON string object. | |
| str_t | nyx_string_t::nyx_string_to_string (const nyx_string_t *object) |
| Returns a C string, with the special character escaping, representing the provided JSON string object. | |
| str_t | nyx_string_t::nyx_string_to_cstring (const nyx_string_t *object) |
| Returns a C string, without special character escaping, representing the provided JSON string object. | |
| __NYX_INLINE__ nyx_string_t * | nyx_string_t::nyx_string_from (STR_t value, bool managed) |
| Returns a JSON string object holding the provided text value. | |
| __NYX_INLINE__ nyx_string_t * | nyx_string_t::nyx_string_from_buff (size_t size, BUFF_t buff, bool managed) |
| Returns a JSON string object holding the provided content bytes. | |
JSON String Object.
| struct nyx_string_t |
Struct describing a JSON string object.
Definition at line 913 of file nyx_node.h.

Public Member Functions | |
| nyx_string_t * | nyx_string_new (void) |
| Allocates a new JSON string object. | |
| STR_t | nyx_string_get (const nyx_string_t *object) |
| Gets the text value of the provided JSON string object. | |
| void | nyx_string_get_buff (const nyx_string_t *object, __NYX_NULLABLE__ size_t *result_size, __NYX_NULLABLE__ buff_t *result_buff) |
| Gets the content of the provided JSON string object as a byte buffer. | |
| bool | nyx_string_set (nyx_string_t *object, STR_t value, bool managed) |
| Sets the text value of the provided JSON string object. | |
| bool | nyx_string_set_buff (nyx_string_t *object, size_t size, BUFF_t buff, bool managed) |
| Sets the content of the provided JSON string object from a byte buffer. | |
| size_t | nyx_string_length (const nyx_string_t *object) |
| Returns the number of content bytes of the provided JSON string object. | |
| str_t | nyx_string_to_string (const nyx_string_t *object) |
| Returns a C string, with the special character escaping, representing the provided JSON string object. | |
| str_t | nyx_string_to_cstring (const nyx_string_t *object) |
| Returns a C string, without special character escaping, representing the provided JSON string object. | |
| __NYX_INLINE__ nyx_string_t * | nyx_string_from (STR_t value, bool managed) |
| Returns a JSON string object holding the provided text value. | |
| __NYX_INLINE__ nyx_string_t * | nyx_string_from_buff (size_t size, BUFF_t buff, bool managed) |
| Returns a JSON string object holding the provided content bytes. | |
Public Attributes | |
| nyx_object_t | base |
| Common object header for JSON objects. | |
| bool | managed |
| true if the value is freed with this object. | |
| size_t | length |
| C string length excluding NULL. | |
| str_t | value |
| C string payload. | |
| nyx_string_t * nyx_string_new | ( | void | ) |
Allocates a new JSON string object.
Definition at line 14 of file json_string.c.
| STR_t nyx_string_get | ( | const nyx_string_t * | object | ) |
Gets the text value of the provided JSON string object.
| object | JSON string object. |
Definition at line 56 of file json_string.c.
| void nyx_string_get_buff | ( | const nyx_string_t * | object, |
| __NYX_NULLABLE__ size_t * | result_size, | ||
| __NYX_NULLABLE__ buff_t * | result_buff ) |
Gets the content of the provided JSON string object as a byte buffer.
| object | JSON string object. |
| result_size | Optional pointer receiving the number of content bytes. |
| result_buff | Optional pointer receiving the content buffer. |
| bool nyx_string_set | ( | nyx_string_t * | object, |
| STR_t | value, | ||
| bool | managed ) |
Sets the text value of the provided JSON string object.
| object | JSON string object. |
| value | Text value. |
| managed | If true, ownership of the provided value is transferred to the object. |
Definition at line 76 of file json_string.c.
| bool nyx_string_set_buff | ( | nyx_string_t * | object, |
| size_t | size, | ||
| BUFF_t | buff, | ||
| bool | managed ) |
Sets the content of the provided JSON string object from a byte buffer.
| object | JSON string object. |
| size | Number of content bytes. |
| buff | Content buffer. |
| managed | If true, ownership of the provided buffer is transferred to the object. |
Definition at line 112 of file json_string.c.
| size_t nyx_string_length | ( | const nyx_string_t * | object | ) |
Returns the number of content bytes of the provided JSON string object.
| object | JSON string object. |
Definition at line 148 of file json_string.c.
| str_t nyx_string_to_string | ( | const nyx_string_t * | object | ) |
Returns a C string, with the special character escaping, representing the provided JSON string object.
| object | JSON string object. |
Definition at line 155 of file json_string.c.
| str_t nyx_string_to_cstring | ( | const nyx_string_t * | object | ) |
Returns a C string, without special character escaping, representing the provided JSON string object.
| object | JSON string object. |
Definition at line 172 of file json_string.c.
| __NYX_INLINE__ nyx_string_t * nyx_string_from | ( | STR_t | value, |
| bool | managed ) |
Returns a JSON string object holding the provided text value.
| value | Text value. |
| managed | If true, ownership of the provided value is transferred to the object. |
Definition at line 1051 of file nyx_node.h.
| __NYX_INLINE__ nyx_string_t * nyx_string_from_buff | ( | size_t | size, |
| BUFF_t | buff, | ||
| bool | managed ) |
Returns a JSON string object holding the provided content bytes.
| size | Number of content bytes. |
| buff | Content buffer. |
| managed | If true, ownership of the provided buffer is transferred to the object. |
Definition at line 1071 of file nyx_node.h.