mirror of
https://github.com/DaveGamble/cJSON.git
synced 2023-08-10 21:13:26 +03:00
reformatting: cJSON.h
This commit is contained in:
parent
34388c2d4c
commit
ad3d5130b5
28
cJSON.h
28
cJSON.h
@ -41,20 +41,30 @@ extern "C"
|
|||||||
#define cJSON_StringIsConst 512
|
#define cJSON_StringIsConst 512
|
||||||
|
|
||||||
/* The cJSON structure: */
|
/* The cJSON structure: */
|
||||||
typedef struct cJSON {
|
typedef struct cJSON
|
||||||
struct cJSON *next,*prev; /* next/prev allow you to walk array/object chains. Alternatively, use GetArraySize/GetArrayItem/GetObjectItem */
|
{
|
||||||
struct cJSON *child; /* An array or object item will have a child pointer pointing to a chain of the items in the array/object. */
|
/* next/prev allow you to walk array/object chains. Alternatively, use GetArraySize/GetArrayItem/GetObjectItem */
|
||||||
|
struct cJSON *next;
|
||||||
|
struct cJSON *prev;
|
||||||
|
/* An array or object item will have a child pointer pointing to a chain of the items in the array/object. */
|
||||||
|
struct cJSON *child;
|
||||||
|
|
||||||
int type; /* The type of the item, as above. */
|
/* The type of the item, as above. */
|
||||||
|
int type;
|
||||||
|
|
||||||
char *valuestring; /* The item's string, if type==cJSON_String */
|
/* The item's string, if type==cJSON_String */
|
||||||
int valueint; /* The item's number, if type==cJSON_Number */
|
char *valuestring;
|
||||||
double valuedouble; /* The item's number, if type==cJSON_Number */
|
/* The item's number, if type==cJSON_Number */
|
||||||
|
int valueint;
|
||||||
|
/* The item's number, if type==cJSON_Number */
|
||||||
|
double valuedouble;
|
||||||
|
|
||||||
char *string; /* The item's name string, if this item is the child of, or is in the list of subitems of an object. */
|
/* The item's name string, if this item is the child of, or is in the list of subitems of an object. */
|
||||||
|
char *string;
|
||||||
} cJSON;
|
} cJSON;
|
||||||
|
|
||||||
typedef struct cJSON_Hooks {
|
typedef struct cJSON_Hooks
|
||||||
|
{
|
||||||
void *(*malloc_fn)(size_t sz);
|
void *(*malloc_fn)(size_t sz);
|
||||||
void (*free_fn)(void *ptr);
|
void (*free_fn)(void *ptr);
|
||||||
} cJSON_Hooks;
|
} cJSON_Hooks;
|
||||||
|
Loading…
Reference in New Issue
Block a user