Nyx Node
Loading...
Searching...
No Matches
Collaboration diagram for JSON Dict Object:

Classes

struct  nyx_dict_t
 Struct describing a JSON dict. More...
 
struct  nyx_dict_iter_t
 

Macros

#define NYX_DICT_ITER(object)
 

Functions

nyx_dict_tnyx_dict_t::nyx_dict_new ()
 Allocates a new JSON dict object.
 
void nyx_dict_t::nyx_dict_free (nyx_dict_t *object)
 Frees memory of the provided JSON dict object.
 
void nyx_dict_t::nyx_dict_clear (nyx_dict_t *object)
 Clears the content of the provided JSON dict object.
 
void nyx_dict_t::nyx_dict_del (nyx_dict_t *object, STR_t key)
 
bool nyx_dict_t::nyx_dict_iterate (nyx_dict_iter_t *iter, STR_t *key, nyx_object_t **object)
 
nyx_object_tnyx_dict_t::nyx_dict_get (const nyx_dict_t *object, STR_t key)
 
__INLINE__ bool nyx_dict_t::nyx_dict_set (nyx_dict_t *object, STR_t key, buff_t value)
 
size_t nyx_dict_t::nyx_dict_size (const nyx_dict_t *object)
 Gets the number of items in the provided JSON dict object.
 
str_t nyx_dict_t::nyx_dict_to_string (const nyx_dict_t *object)
 Returns a string representing the provided JSON dict object.
 
__INLINE__ double nyx_dict_t::nyx_dict_get_number (const nyx_dict_t *object, STR_t key)
 
__INLINE__ STR_t nyx_dict_t::nyx_dict_get_string (const nyx_dict_t *object, STR_t key)
 

Detailed Description

Macro Definition Documentation

◆ NYX_DICT_ITER

#define NYX_DICT_ITER ( object)
Value:
((nyx_dict_iter_t) {.idx = 0, .type = ((nyx_dict_t *) (object))->base.type, .head = ((nyx_dict_t *) (object))->head})
Definition nyx_node.h:1036
Struct describing a JSON dict.
Definition nyx_node.h:1025

Function Documentation

◆ nyx_dict_new()

nyx_dict_t * nyx_dict_new ( )

Allocates a new JSON dict object.

Returns
The new JSON dict.

◆ nyx_dict_free()

void nyx_dict_free ( nyx_dict_t * object)

Frees memory of the provided JSON dict object.

Parameters
objectThe provided JSON dict object.

◆ nyx_dict_clear()

void nyx_dict_clear ( nyx_dict_t * object)

Clears the content of the provided JSON dict object.

Parameters
objectThe provided JSON dict object.

◆ nyx_dict_del()

void nyx_dict_del ( nyx_dict_t * object,
STR_t key )
Parameters
object
key

◆ nyx_dict_iterate()

bool nyx_dict_iterate ( nyx_dict_iter_t * iter,
STR_t * key,
nyx_object_t ** object )
Parameters
iter
key
object
Returns

◆ nyx_dict_get()

nyx_object_t * nyx_dict_get ( const nyx_dict_t * object,
STR_t key )
Parameters
object
key
Returns

◆ nyx_dict_set()

__INLINE__ bool nyx_dict_set ( nyx_dict_t * object,
STR_t key,
buff_t value )
Parameters
object
key
value
Returns

◆ nyx_dict_size()

size_t nyx_dict_size ( const nyx_dict_t * object)

Gets the number of items in the provided JSON dict object.

Parameters
objectThe provided JSON dict object.
Returns
The number of items in the provided JSON dict object.

◆ nyx_dict_to_string()

str_t nyx_dict_to_string ( const nyx_dict_t * object)

Returns a string representing the provided JSON dict object.

Parameters
objectThe provided object.
Returns
The string representing the provided JSON dict object.

◆ nyx_dict_get_number()

__INLINE__ double nyx_dict_get_number ( const nyx_dict_t * object,
STR_t key )
Parameters
object
key
Returns

◆ nyx_dict_get_string()

__INLINE__ STR_t nyx_dict_get_string ( const nyx_dict_t * object,
STR_t key )
Parameters
object
key
Returns