Updated stream API.

This commit is contained in:
Christoffer Lerno
2023-09-02 19:48:51 +02:00
committed by Christoffer Lerno
parent a6cff5c2a5
commit 9a6d83f526
44 changed files with 837 additions and 952 deletions

View File

@@ -7,7 +7,7 @@ fn void! simple_test()
{
ByteReader reader;
reader.init(`{ "b": 123, "c": [ { "d": 66 }, null, "hello", false, { "id": "xyz" } ] }`);
Object* o = json::parse(reader.as_stream())!;
Object* o = json::parse(&reader)!;
assert(o.get_int("b")! == 123);
assert(o.get("c").get_len()! == 5);
assert(o.get("c").get_at(0).get_int("d")! == 66);