helloJSON/include/json_entities/json_entities.h
2023-06-26 18:32:53 +01:00

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