typedef struct JSON_VALUE {
enum { INTEGER, DOUBLE, STRING, BOOL } valuetype;
union {
int as_int;
double as_double;
char *as_string;
};
} json_value;
typedef struct {
enum tp { OBJECT, LIST, VALUE } nodetype;
char *key;
union {
json_value *as_value;
json_value **as_list;
json_node **as_object;
};
} json_node;