GRASS 8 Programmer's Manual  8.5.0dev(2025)-9d806b45d8
gjson.c File Reference
#include "gjson.h"
#include "parson.h"
Include dependency graph for gjson.c:

Go to the source code of this file.

Typedefs

typedef struct json_object_t G_json_object_t
 
typedef struct json_array_t G_json_array_t
 
typedef struct json_value_t G_json_value_t
 

Functions

G_JSON_ValueG_json_value_init_object (void)
 
G_JSON_ValueG_json_value_init_array (void)
 
G_JSON_Value_Type G_json_value_get_type (const G_JSON_Value *value)
 
G_JSON_ObjectG_json_value_get_object (const G_JSON_Value *value)
 
G_JSON_ObjectG_json_object (const G_JSON_Value *value)
 
G_JSON_ObjectG_json_object_get_object (const G_JSON_Object *object, const char *name)
 
G_JSON_ArrayG_json_object_get_array (const G_JSON_Object *object, const char *name)
 
G_JSON_ValueG_json_object_get_value (const G_JSON_Object *object, const char *name)
 
const char * G_json_object_get_string (const G_JSON_Object *object, const char *name)
 
double G_json_object_get_number (const G_JSON_Object *object, const char *name)
 
int G_json_object_get_boolean (const G_JSON_Object *object, const char *name)
 
G_JSON_ValueG_json_object_get_wrapping_value (const G_JSON_Object *object)
 
G_JSON_Status G_json_object_set_value (G_JSON_Object *object, const char *name, G_JSON_Value *value)
 
G_JSON_Status G_json_object_set_string (G_JSON_Object *object, const char *name, const char *string)
 
G_JSON_Status G_json_object_set_number (G_JSON_Object *object, const char *name, double number)
 
G_JSON_Status G_json_object_set_boolean (G_JSON_Object *object, const char *name, int boolean)
 
G_JSON_Status G_json_object_set_null (G_JSON_Object *object, const char *name)
 
G_JSON_Status G_json_object_dotset_string (G_JSON_Object *object, const char *name, const char *string)
 
const char * G_json_object_dotget_string (G_JSON_Object *object, const char *name)
 
G_JSON_Status G_json_object_dotset_number (G_JSON_Object *object, const char *name, double number)
 
double G_json_object_dotget_number (G_JSON_Object *object, const char *name)
 
G_JSON_Status G_json_object_dotset_null (G_JSON_Object *object, const char *name)
 
G_JSON_ArrayG_json_array (const G_JSON_Value *value)
 
G_JSON_ValueG_json_array_get_value (const G_JSON_Array *array, size_t index)
 
const char * G_json_array_get_string (const G_JSON_Array *array, size_t index)
 
double G_json_array_get_number (const G_JSON_Array *array, size_t index)
 
int G_json_array_get_boolean (const G_JSON_Array *array, size_t index)
 
G_JSON_Status G_json_array_append_value (G_JSON_Array *array, G_JSON_Value *value)
 
G_JSON_Status G_json_array_append_string (G_JSON_Array *array, const char *string)
 
G_JSON_Status G_json_array_append_number (G_JSON_Array *array, double number)
 
G_JSON_Status G_json_array_append_boolean (G_JSON_Array *array, int boolean)
 
G_JSON_Status G_json_array_append_null (G_JSON_Array *array)
 
void G_json_set_float_serialization_format (const char *format)
 
char * G_json_serialize_to_string_pretty (const G_JSON_Value *value)
 
void G_json_free_serialized_string (char *string)
 
void G_json_value_free (G_JSON_Value *value)
 

Typedef Documentation

◆ G_json_array_t

typedef struct json_array_t G_json_array_t

Definition at line 1 of file gjson.c.

◆ G_json_object_t

typedef struct json_object_t G_json_object_t

Definition at line 1 of file gjson.c.

◆ G_json_value_t

typedef struct json_value_t G_json_value_t

Definition at line 1 of file gjson.c.

Function Documentation

◆ G_json_array()

G_JSON_Array* G_json_array ( const G_JSON_Value value)

Definition at line 150 of file gjson.c.

References json_array().

◆ G_json_array_append_boolean()

G_JSON_Status G_json_array_append_boolean ( G_JSON_Array array,
int  boolean 
)

Definition at line 193 of file gjson.c.

References json_array_append_boolean().

◆ G_json_array_append_null()

G_JSON_Status G_json_array_append_null ( G_JSON_Array array)

Definition at line 198 of file gjson.c.

References json_array_append_null().

◆ G_json_array_append_number()

G_JSON_Status G_json_array_append_number ( G_JSON_Array array,
double  number 
)

Definition at line 188 of file gjson.c.

References json_array_append_number().

◆ G_json_array_append_string()

G_JSON_Status G_json_array_append_string ( G_JSON_Array array,
const char *  string 
)

Definition at line 182 of file gjson.c.

References json_array_append_string().

◆ G_json_array_append_value()

G_JSON_Status G_json_array_append_value ( G_JSON_Array array,
G_JSON_Value value 
)

Definition at line 176 of file gjson.c.

References json_array_append_value().

◆ G_json_array_get_boolean()

int G_json_array_get_boolean ( const G_JSON_Array array,
size_t  index 
)

Definition at line 171 of file gjson.c.

References json_array_get_boolean().

◆ G_json_array_get_number()

double G_json_array_get_number ( const G_JSON_Array array,
size_t  index 
)

Definition at line 166 of file gjson.c.

References json_array_get_number().

◆ G_json_array_get_string()

const char* G_json_array_get_string ( const G_JSON_Array array,
size_t  index 
)

Definition at line 161 of file gjson.c.

References json_array_get_string().

◆ G_json_array_get_value()

G_JSON_Value* G_json_array_get_value ( const G_JSON_Array array,
size_t  index 
)

Definition at line 155 of file gjson.c.

References json_array_get_value().

◆ G_json_free_serialized_string()

void G_json_free_serialized_string ( char *  string)

Definition at line 213 of file gjson.c.

References json_free_serialized_string().

◆ G_json_object()

G_JSON_Object* G_json_object ( const G_JSON_Value value)

Definition at line 49 of file gjson.c.

References json_object().

◆ G_json_object_dotget_number()

double G_json_object_dotget_number ( G_JSON_Object object,
const char *  name 
)

Definition at line 140 of file gjson.c.

References json_object_dotget_number(), and name.

◆ G_json_object_dotget_string()

const char* G_json_object_dotget_string ( G_JSON_Object object,
const char *  name 
)

Definition at line 129 of file gjson.c.

References json_object_dotget_string(), and name.

◆ G_json_object_dotset_null()

G_JSON_Status G_json_object_dotset_null ( G_JSON_Object object,
const char *  name 
)

Definition at line 145 of file gjson.c.

References json_object_dotset_null(), and name.

◆ G_json_object_dotset_number()

G_JSON_Status G_json_object_dotset_number ( G_JSON_Object object,
const char *  name,
double  number 
)

Definition at line 134 of file gjson.c.

References json_object_dotset_number(), and name.

◆ G_json_object_dotset_string()

G_JSON_Status G_json_object_dotset_string ( G_JSON_Object object,
const char *  name,
const char *  string 
)

Definition at line 123 of file gjson.c.

References json_object_dotset_string(), and name.

◆ G_json_object_get_array()

G_JSON_Array* G_json_object_get_array ( const G_JSON_Object object,
const char *  name 
)

Definition at line 61 of file gjson.c.

References json_object_get_array(), and name.

◆ G_json_object_get_boolean()

int G_json_object_get_boolean ( const G_JSON_Object object,
const char *  name 
)

Definition at line 86 of file gjson.c.

References json_object_get_boolean(), and name.

◆ G_json_object_get_number()

double G_json_object_get_number ( const G_JSON_Object object,
const char *  name 
)

Definition at line 81 of file gjson.c.

References json_object_get_number(), and name.

◆ G_json_object_get_object()

G_JSON_Object* G_json_object_get_object ( const G_JSON_Object object,
const char *  name 
)

Definition at line 54 of file gjson.c.

References json_object_get_object(), and name.

◆ G_json_object_get_string()

const char* G_json_object_get_string ( const G_JSON_Object object,
const char *  name 
)

Definition at line 75 of file gjson.c.

References json_object_get_string(), and name.

◆ G_json_object_get_value()

G_JSON_Value* G_json_object_get_value ( const G_JSON_Object object,
const char *  name 
)

Definition at line 68 of file gjson.c.

References json_object_get_value(), and name.

◆ G_json_object_get_wrapping_value()

G_JSON_Value* G_json_object_get_wrapping_value ( const G_JSON_Object object)

Definition at line 91 of file gjson.c.

References json_object_get_wrapping_value().

◆ G_json_object_set_boolean()

G_JSON_Status G_json_object_set_boolean ( G_JSON_Object object,
const char *  name,
int  boolean 
)

Definition at line 112 of file gjson.c.

References json_object_set_boolean(), and name.

◆ G_json_object_set_null()

G_JSON_Status G_json_object_set_null ( G_JSON_Object object,
const char *  name 
)

Definition at line 118 of file gjson.c.

References json_object_set_null(), and name.

◆ G_json_object_set_number()

G_JSON_Status G_json_object_set_number ( G_JSON_Object object,
const char *  name,
double  number 
)

Definition at line 107 of file gjson.c.

References json_object_set_number(), and name.

◆ G_json_object_set_string()

G_JSON_Status G_json_object_set_string ( G_JSON_Object object,
const char *  name,
const char *  string 
)

Definition at line 102 of file gjson.c.

References json_object_set_string(), and name.

◆ G_json_object_set_value()

G_JSON_Status G_json_object_set_value ( G_JSON_Object object,
const char *  name,
G_JSON_Value value 
)

Definition at line 96 of file gjson.c.

References json_object_set_value(), and name.

◆ G_json_serialize_to_string_pretty()

char* G_json_serialize_to_string_pretty ( const G_JSON_Value value)

Definition at line 208 of file gjson.c.

References json_serialize_to_string_pretty().

◆ G_json_set_float_serialization_format()

void G_json_set_float_serialization_format ( const char *  format)

Definition at line 203 of file gjson.c.

◆ G_json_value_free()

void G_json_value_free ( G_JSON_Value value)

Definition at line 218 of file gjson.c.

References json_value_free().

◆ G_json_value_get_object()

G_JSON_Object* G_json_value_get_object ( const G_JSON_Value value)

Definition at line 44 of file gjson.c.

References json_value_get_object().

◆ G_json_value_get_type()

G_JSON_Value_Type G_json_value_get_type ( const G_JSON_Value value)

Definition at line 39 of file gjson.c.

References json_value_get_type().

◆ G_json_value_init_array()

G_JSON_Value* G_json_value_init_array ( void  )

Definition at line 34 of file gjson.c.

References json_value_init_array().

◆ G_json_value_init_object()

G_JSON_Value* G_json_value_init_object ( void  )

Definition at line 29 of file gjson.c.

References json_value_init_object().