--- /dev/null
+package json
+use package core
+
+decode_string :: (data: str, allocator := context.allocator) -> Value {
+ stream := io.string_stream_make(data);
+ return decode(^stream, allocator);
+}
+
+decode :: (stream: ^io.Stream, allocator := context.allocator) -> Value {
+
+}
\ No newline at end of file
--- /dev/null
+package json
\ No newline at end of file
--- /dev/null
+
+#load "core/std"
+#load "modules/json/module"
+
+use package core
+json :: package json
+
+json_string := "{ \"test\": \"Hello, World!\", \"array\": [1,2,3,4,5], }";
+
+main :: (args: [] cstr) {
+ decoded_json := json.decode_string(json_string);
+ defer json.free(decoded_json);
+
+ test_str := decoded_json |> json.get("test")
+ |> json.to_str();
+ println(test_str);
+}
\ No newline at end of file
--- /dev/null
+
+
+
+package json
+
+#load "./encoder"
+#load "./decoder"
\ No newline at end of file
--- /dev/null
+package json
+
+use package core.map { Map }
+
+Value :: struct {
+ Type :: enum {
+ Null;
+ Bool;
+ Integer;
+ Float;
+ String;
+ Array;
+ Object;
+ }
+
+ type : Type;
+ value : struct #union {
+ bool_ : bool;
+ int_ : i64;
+ float_ : f64;
+ str_ : str;
+ array_ : [..] Value;
+ object_ : Map(str, Value);
+ }
+}
\ No newline at end of file