aboutsummaryrefslogtreecommitdiff
path: root/json.h
diff options
context:
space:
mode:
Diffstat (limited to 'json.h')
-rw-r--r--json.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/json.h b/json.h
index 44b064e..5f2f4c0 100644
--- a/json.h
+++ b/json.h
@@ -5,10 +5,17 @@
#include "vec.h"
typedef struct {
+ Vec keys; // Vec<Str>
+ Vec values; // Vec<JSON>
+ ptrdiff_t len;
+} JSONObject;
+typedef struct {
int *integer;
- Vec *array;
+ Vec *array; // Vec<JSON>
Str *string;
+ JSONObject *object;
} JSON;
+JSON* JSONObject_get(JSONObject *obj, Str key);
JSON JSON_parse(Arena *a, char *src);
JSON JSON_Int(Arena *a, int val);
#endif