aboutsummaryrefslogtreecommitdiff
path: root/json.h
diff options
context:
space:
mode:
Diffstat (limited to 'json.h')
-rw-r--r--json.h36
1 files changed, 0 insertions, 36 deletions
diff --git a/json.h b/json.h
deleted file mode 100644
index 60e853c..0000000
--- a/json.h
+++ /dev/null
@@ -1,36 +0,0 @@
-#ifndef JSON_H
-#define JSON_H
-#include "memory.h"
-#include "string.h"
-#include "vec.h"
-
-typedef struct {
- Vec keys; // Vec<Str>
- Vec values; // Vec<JSON>
- size len;
-} JSONObject;
-typedef enum {
- JSON_NULL,
- JSON_BOOL,
- JSON_INTEGER,
- JSON_FLOAT,
- JSON_STRING,
- JSON_ARRAY,
- JSON_OBJECT
-} JSONType;
-typedef struct {
- JSONType type;
- union {
- bool boolean;
- i32 integer;
- f32 floating;
- Vec array; // Vec<JSON>
- Str string;
- JSONObject object;
- } as;
-} JSON;
-JSON *JSONObject_get(JSONObject obj, Str key);
-i32 JSON_fprint(FILE *w, JSON json);
-JSON JSON_parse(Arena *a, byte *src);
-JSON JSON_Int(Arena *a, i32 val);
-#endif