Nyx Node
Loading...
Searching...
No Matches

Struct describing a JSON string object. More...

#include <nyx_node.h>

Collaboration diagram for nyx_string_t:

Public Member Functions

nyx_string_tnyx_string_new (void)
 Allocates a new JSON string object.
 
void nyx_string_free (nyx_string_t *object)
 Frees memory of the provided JSON string object.
 
STR_t nyx_string_get (const nyx_string_t *object)
 Get the value of the provided JSON string object.
 
bool nyx_string_set (nyx_string_t *object, STR_t value, bool managed)
 Set the value of the provided JSON string object.
 
bool nyx_string_set_buff (nyx_string_t *object, size_t size, BUFF_t buff, bool managed)
 Set the value of the provided JSON string object.
 
size_t nyx_string_length (const nyx_string_t *object)
 Returns the length of the provided JSON string object.
 
str_t nyx_string_to_string (const nyx_string_t *object)
 Returns a C string, with 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_tnyx_string_from_dup (STR_t value)
 Returns a JSON string object holding the value of the provided string (managed duplication).
 
__NYX_INLINE__ nyx_string_tnyx_string_from_managed (STR_t value)
 Returns a JSON string object holding the value of the provided string (managed reference).
 
__NYX_INLINE__ nyx_string_tnyx_string_from_unmanaged (STR_t value)
 Returns a JSON string object holding the value of the provided string (unmanaged reference).
 
__NYX_INLINE__ nyx_string_tnyx_string_from_buff_managed (size_t size, BUFF_t buff)
 Returns a JSON string object holding the value of the provided buffer (managed reference).
 
__NYX_INLINE__ nyx_string_tnyx_string_from_buff_unmanaged (size_t size, BUFF_t buff)
 Returns a JSON string object holding the value of the provided buffer (unmanaged reference).
 

Data Fields

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.
 

Detailed Description

Struct describing a JSON string object.

Definition at line 899 of file nyx_node.h.

Field Documentation

◆ base

nyx_object_t nyx_string_t::base

Common object header for JSON objects.

Definition at line 901 of file nyx_node.h.

◆ managed

bool nyx_string_t::managed

true if the value is freed with this object.

Definition at line 903 of file nyx_node.h.

◆ length

size_t nyx_string_t::length

C string length excluding NULL.

Definition at line 904 of file nyx_node.h.

◆ value

str_t nyx_string_t::value

C string payload.

Definition at line 905 of file nyx_node.h.


The documentation for this struct was generated from the following file: