Add json.unmarshal

This commit is contained in:
gingerBill
2021-09-25 17:47:45 +01:00
parent 931fdd2dca
commit 6a271355a6
5 changed files with 607 additions and 23 deletions
+1 -1
View File
@@ -3,7 +3,7 @@ package json
import "core:mem"
// NOTE(bill): is_valid will not check for duplicate keys
is_valid :: proc(data: []byte, spec := Specification.JSON, parse_integers := false) -> bool {
is_valid :: proc(data: []byte, spec := DEFAULT_SPECIFICATION, parse_integers := false) -> bool {
p := make_parser(data, spec, parse_integers, mem.nil_allocator())
if p.spec == Specification.JSON5 {
return validate_value(&p)