Rename json entities
This commit is contained in:
parent
14ad503d4d
commit
0a7e2f7f0c
@ -5,21 +5,21 @@
|
|||||||
#include "dstring.h"
|
#include "dstring.h"
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
|
||||||
typedef struct jentity jentity_t;
|
typedef struct json_entity jentity_t;
|
||||||
typedef struct jcoll jcoll_t;
|
typedef struct json_collection jcoll_t;
|
||||||
typedef struct jval jval_t;
|
typedef struct json_value jval_t;
|
||||||
typedef struct jpair jpair_t;
|
typedef struct json_pair jpair_t;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
JSON_VALUE_COLLECTION,
|
JVAL_COLLECTION,
|
||||||
JSON_VALUE_STRING,
|
JVAL_STRING,
|
||||||
JSON_VALUE_INTEGER,
|
JVAL_INTEGER,
|
||||||
JSON_VALUE_DOUBLE,
|
JVAL_DOUBLE,
|
||||||
JSON_VALUE_BOOLEAN,
|
JVAL_BOOLEAN,
|
||||||
JSON_VALUE_NULL,
|
JVAL_NULL,
|
||||||
} jval_type;
|
} jval_type;
|
||||||
|
|
||||||
struct jval {
|
struct json_value {
|
||||||
jval_type type;
|
jval_type type;
|
||||||
union {
|
union {
|
||||||
jcoll_t *collection;
|
jcoll_t *collection;
|
||||||
@ -30,17 +30,17 @@ struct jval {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
struct jpair {
|
struct json_pair {
|
||||||
dstr_t *key;
|
dstr_t *key;
|
||||||
jval_t value;
|
jval_t value;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
JVAL_SINGLE,
|
JENTITY_SINGLE,
|
||||||
JVAL_PAIR,
|
JENTITY_PAIR,
|
||||||
} jentity_type;
|
} jentity_type;
|
||||||
|
|
||||||
struct jentity {
|
struct json_entity {
|
||||||
jentity_type type;
|
jentity_type type;
|
||||||
union {
|
union {
|
||||||
jval_t value;
|
jval_t value;
|
||||||
@ -55,7 +55,7 @@ typedef enum {
|
|||||||
JCOLL_ARRAY,
|
JCOLL_ARRAY,
|
||||||
} jcoll_type;
|
} jcoll_type;
|
||||||
|
|
||||||
struct jcoll {
|
struct json_collection {
|
||||||
u64 size;
|
u64 size;
|
||||||
jcoll_type type;
|
jcoll_type type;
|
||||||
jentity_t *first_child;
|
jentity_t *first_child;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user