Loading...
Searching...
No Matches
gjson.h File Reference
`#include <stddef.h>`
Include dependency graph for gjson.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Typedefs

typedef struct G_json_object_t | G_JSON_Object
typedef struct G_json_array_t | G_JSON_Array
typedef struct G_json_value_t | G_JSON_Value
typedef int | G_JSON_Value_Type
typedef int | G_JSON_Status

## Enumerations

enum | g_json_value_type { G_JSONError = -1 , G_JSONNull = 1 , G_JSONString = 2 , G_JSONNumber = 3 , G_JSONObject = 4 , G_JSONArray = 5 , G_JSONBoolean = 6 }
enum | g_json_result_t { G_JSONSuccess = 0 , G_JSONFailure = -1 }

## Functions

G_JSON_Value * | G_json_value_init_object (void)
G_JSON_Value * | G_json_value_init_array (void)
G_JSON_Value_Type | G_json_value_get_type (const G_JSON_Value *value)
G_JSON_Object * | G_json_value_get_object (const G_JSON_Value *)
G_JSON_Object * | G_json_object (const G_JSON_Value *)
G_JSON_Object * | G_json_object_get_object (const G_JSON_Object *, const char *)
G_JSON_Array * | G_json_object_get_array (const G_JSON_Object *, const char *)
G_JSON_Value * | G_json_object_get_value (const G_JSON_Object *, const char *)
const char * | G_json_object_get_string (const G_JSON_Object *, const char *)
double | G_json_object_get_number (const G_JSON_Object *, const char *)
int | G_json_object_get_boolean (const G_JSON_Object *, const char *)
G_JSON_Value * | G_json_object_get_wrapping_value (const G_JSON_Object *)
G_JSON_Status | G_json_object_set_value (G_JSON_Object *, const char *, G_JSON_Value *)
G_JSON_Status | G_json_object_set_string (G_JSON_Object *, const char *, const char *)
G_JSON_Status | G_json_object_set_number (G_JSON_Object *, const char *, double)
G_JSON_Status | G_json_object_set_boolean (G_JSON_Object *, const char *, int)
G_JSON_Status | G_json_object_set_null (G_JSON_Object *, const char *)
G_JSON_Status | G_json_object_dotset_string (G_JSON_Object *, const char *, const char *)
const char * | G_json_object_dotget_string (G_JSON_Object *, const char *)
G_JSON_Status | G_json_object_dotset_number (G_JSON_Object *, const char *, double)
double | G_json_object_dotget_number (G_JSON_Object *, const char *)
G_JSON_Status | G_json_object_dotset_null (G_JSON_Object *object, const char *name)
G_JSON_Array * | G_json_array (const G_JSON_Value *)
G_JSON_Value * | G_json_array_get_value (const G_JSON_Array *, size_t)
const char * | G_json_array_get_string (const G_JSON_Array *, size_t)
double | G_json_array_get_number (const G_JSON_Array *, size_t)
int | G_json_array_get_boolean (const G_JSON_Array *, size_t)
G_JSON_Status | G_json_array_append_value (G_JSON_Array *, G_JSON_Value *)
G_JSON_Status | G_json_array_append_string (G_JSON_Array *, const char *)
G_JSON_Status | G_json_array_append_number (G_JSON_Array *, double)
G_JSON_Status | G_json_array_append_boolean (G_JSON_Array *, int)
G_JSON_Status | G_json_array_append_null (G_JSON_Array *)
void | G_json_set_float_serialization_format (const char *format)
char * | G_json_serialize_to_string_pretty (const G_JSON_Value *)
char * | G_json_serialize_to_string (const G_JSON_Value *)
void | G_json_free_serialized_string (char *)
void | G_json_value_free (G_JSON_Value *)

## Typedef Documentation

## G_JSON_Array

typedef struct G_json_array_t G_JSON_Array

Definition at line 11 of file gjson.h.

## G_JSON_Object

typedef struct G_json_object_t G_JSON_Object

Definition at line 10 of file gjson.h.

## G_JSON_Status

typedef int G_JSON_Status

Definition at line 26 of file gjson.h.

## G_JSON_Value

typedef struct G_json_value_t G_JSON_Value

Definition at line 12 of file gjson.h.

## G_JSON_Value_Type

typedef int G_JSON_Value_Type

Definition at line 23 of file gjson.h.

## Enumeration Type Documentation

## g_json_result_t

enum g_json_result_t

Enumerator
G_JSONSuccess |
G_JSONFailure |

Definition at line 25 of file gjson.h.

## g_json_value_type

enum g_json_value_type

Enumerator
G_JSONError |
G_JSONNull |
G_JSONString |
G_JSONNumber |
G_JSONObject |
G_JSONArray |
G_JSONBoolean |

Definition at line 14 of file gjson.h.

## Function Documentation

## G_json_array()

G_JSON_Array * G_json_array | ( | const G_JSON_Value * | value | ) |

extern

Since
  version 8.5

Definition at line 188 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 )

extern

Since
  version 8.5

Definition at line 239 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 | ) |

extern

Since
  version 8.5

Definition at line 245 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 )

extern

Since
  version 8.5

Definition at line 233 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 )

extern

Since
  version 8.5

Definition at line 226 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 )

extern

Since
  version 8.5

Definition at line 219 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 )

extern

Since
  version 8.5

Definition at line 213 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 )

extern

Since
  version 8.5

Definition at line 207 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 )

extern

Since
  version 8.5

Definition at line 201 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 )

extern

Since
  version 8.5

Definition at line 194 of file gjson.c.

References json_array_get_value().

## G_json_free_serialized_string()

void G_json_free_serialized_string | ( | char * | string | ) |

extern

Since
  version 8.5

Definition at line 269 of file gjson.c.

References json_free_serialized_string().

## G_json_object()

G_JSON_Object * G_json_object | ( | const G_JSON_Value * | value | ) |

extern

Since
  version 8.5

Definition at line 65 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 )

extern

Since
  version 8.5

Definition at line 176 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 )

extern

Since
  version 8.5

Definition at line 163 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 )

extern

Since
  version 8.5

Definition at line 182 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 )

extern

Since
  version 8.5

Definition at line 169 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 )

extern

Since
  version 8.5

Definition at line 156 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 )

extern

Since
  version 8.5

Definition at line 79 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 )

extern

Since
  version 8.5

Definition at line 108 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 )

extern

Since
  version 8.5

Definition at line 102 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 )

extern

Since
  version 8.5

Definition at line 71 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 )

extern

Since
  version 8.5

Definition at line 95 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 )

extern

Since
  version 8.5

Definition at line 87 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 | ) |

extern

Since
  version 8.5

Definition at line 114 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 )

extern

Since
  version 8.5

Definition at line 143 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 )

extern

Since
  version 8.5

Definition at line 150 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 )

extern

Since
  version 8.5

Definition at line 136 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 )

extern

Since
  version 8.5

Definition at line 129 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 )

extern

Since
  version 8.5

Definition at line 121 of file gjson.c.

References json_object_set_value(), and name.

## G_json_serialize_to_string()

char * G_json_serialize_to_string | ( | const G_JSON_Value * | value | ) |

extern

Since
  version 8.5

Definition at line 263 of file gjson.c.

References json_serialize_to_string().

## G_json_serialize_to_string_pretty()

char * G_json_serialize_to_string_pretty | ( | const G_JSON_Value * | value | ) |

extern

Since
  version 8.5

Definition at line 257 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 | ) |

extern

Since
  version 8.5

Definition at line 251 of file gjson.c.

References json_set_float_serialization_format().

## G_json_value_free()

void G_json_value_free | ( | G_JSON_Value * | value | ) |

extern

Since
  version 8.5

Definition at line 275 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 | ) |

extern

Since
  version 8.5

Definition at line 59 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 | ) |

extern

Since
  version 8.5

Definition at line 53 of file gjson.c.

References json_value_get_type().

## G_json_value_init_array()

G_JSON_Value * G_json_value_init_array | ( | void |  | ) |

extern

Since
  version 8.5

Definition at line 47 of file gjson.c.

References json_value_init_array().

## G_json_value_init_object()

G_JSON_Value * G_json_value_init_object | ( | void |  | ) |

extern

Since
  version 8.5

Definition at line 41 of file gjson.c.

References json_value_init_object().