31 lines
423 B
C
31 lines
423 B
C
#ifndef JSON_ENTITIES_H
|
|
#define JSON_ENTITIES_H
|
|
|
|
#include "aliases.h"
|
|
#include "dstring.h"
|
|
#include <stdbool.h>
|
|
|
|
typedef struct json_value jval_t;
|
|
|
|
typedef enum {
|
|
JVAL_OBJECT,
|
|
JVAL_ARRAY,
|
|
JVAL_STRING,
|
|
JVAL_INTEGER,
|
|
JVAL_DOUBLE,
|
|
JVAL_BOOLEAN,
|
|
JVAL_NULL,
|
|
} jval_type_t;
|
|
|
|
struct json_value {
|
|
jval_type_t type;
|
|
union {
|
|
dstr_t *string;
|
|
i64 num_int;
|
|
f64 num_dbl;
|
|
bool boolean;
|
|
};
|
|
};
|
|
|
|
#endif // !JSON_ENTITIES_H
|