aboutsummaryrefslogtreecommitdiff
path: root/include/json.h
diff options
context:
space:
mode:
authorMartin Kagamino Lehoux <martin@lehoux.net>2026-04-08 13:14:27 +0200
committerMartin Kagamino Lehoux <martin@lehoux.net>2026-04-08 13:15:01 +0200
commitcf534d762754860ed5b714974f99acd282d48b3b (patch)
treebf22341cedfb50ee7bcd4e15f85add2329783f31 /include/json.h
parent630fcb1846aed16b9ab62bcf700f668883f4521f (diff)
Restructure into src/{std,json}/
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'include/json.h')
-rw-r--r--include/json.h34
1 files changed, 0 insertions, 34 deletions
diff --git a/include/json.h b/include/json.h
deleted file mode 100644
index 52566ab..0000000
--- a/include/json.h
+++ /dev/null
@@ -1,34 +0,0 @@
-#pragma once
-#include "../include/memory.h"
-#include "../include/str.h"
-#include "../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>
- StrView 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, uptr len);
-JSON JSON_Int(Arena *a, i32 val);