Gateway C ABI
Loading...
Searching...
No Matches
json.h File Reference
#include <stdbool.h>
#include <stdint.h>

Go to the source code of this file.

Data Structures

struct  sGCJsonObject
 The JSON object. More...
 
struct  sGCJsonCallbacks
 The JSON configuration data and parsing callbacks. More...
 

Typedefs

typedef enum eGCJsonType GCJsonType
 
typedef enum eResultCallback GCResultCallback
 
typedef struct sGCJsonObject GCJsonObject
 
typedef const char * GCString
 
typedef bool(* tJsonObjectGetBool) (const GCJsonObject obj, GCResultCallback *result)
 
typedef int64_t(* tJsonObjectGetInt) (const GCJsonObject obj, GCResultCallback *result)
 
typedef double(* tJsonObjectGetDouble) (const GCJsonObject obj, GCResultCallback *result)
 
typedef char *(* tJsonObjectGetString) (const GCJsonObject obj, GCResultCallback *result)
 
typedef char *(* tJsonObjectSerialize) (const GCJsonObject obj, GCResultCallback *result)
 
typedef const GCJsonObject(* tJsonObjectGetArrayIdx) (const GCJsonObject obj, int64_t idx, GCResultCallback *result)
 
typedef const int64_t(* tJsonObjectGetArrayLength) (const GCJsonObject obj, GCResultCallback *result)
 
typedef const GCJsonObject(* tJsonObjectGetObjectField) (const GCJsonObject obj, const char *fieldName, GCResultCallback *result)
 
typedef void(* tFreeSring) (GCString)
 
typedef const struct sGCJsonCallbacksGCJsonCallbacks
 

Enumerations

enum  eGCJsonType {
  GC_JSON_TYPE_NULL , GC_JSON_TYPE_BOOL , GC_JSON_TYPE_INT , GC_JSON_TYPE_DOUBLE ,
  GC_JSON_TYPE_STRING , GC_JSON_TYPE_ARRAY , GC_JSON_TYPE_OBJECT
}
 The JSON types available. More...
 
enum  eResultCallback { GC_JSON_OK , GC_JSON_ERROR }
 The result of a json callback. More...
 

Typedef Documentation

◆ GCJsonCallbacks

typedef const struct sGCJsonCallbacks* GCJsonCallbacks

◆ GCJsonObject

typedef struct sGCJsonObject GCJsonObject

◆ GCJsonType

typedef enum eGCJsonType GCJsonType

◆ GCResultCallback

◆ GCString

typedef const char* GCString

◆ tFreeSring

typedef void(* tFreeSring) (GCString)

◆ tJsonObjectGetArrayIdx

typedef const GCJsonObject(* tJsonObjectGetArrayIdx) (const GCJsonObject obj, int64_t idx, GCResultCallback *result)

◆ tJsonObjectGetArrayLength

typedef const int64_t(* tJsonObjectGetArrayLength) (const GCJsonObject obj, GCResultCallback *result)

◆ tJsonObjectGetBool

typedef bool(* tJsonObjectGetBool) (const GCJsonObject obj, GCResultCallback *result)

◆ tJsonObjectGetDouble

typedef double(* tJsonObjectGetDouble) (const GCJsonObject obj, GCResultCallback *result)

◆ tJsonObjectGetInt

typedef int64_t(* tJsonObjectGetInt) (const GCJsonObject obj, GCResultCallback *result)

◆ tJsonObjectGetObjectField

typedef const GCJsonObject(* tJsonObjectGetObjectField) (const GCJsonObject obj, const char *fieldName, GCResultCallback *result)

◆ tJsonObjectGetString

typedef char *(* tJsonObjectGetString) (const GCJsonObject obj, GCResultCallback *result)

◆ tJsonObjectSerialize

typedef char *(* tJsonObjectSerialize) (const GCJsonObject obj, GCResultCallback *result)

Enumeration Type Documentation

◆ eGCJsonType

The JSON types available.

Enumerator
GC_JSON_TYPE_NULL 
GC_JSON_TYPE_BOOL 
GC_JSON_TYPE_INT 
GC_JSON_TYPE_DOUBLE 
GC_JSON_TYPE_STRING 
GC_JSON_TYPE_ARRAY 
GC_JSON_TYPE_OBJECT 

◆ eResultCallback

The result of a json callback.

Enumerator
GC_JSON_OK 
GC_JSON_ERROR