Make encoding/json use []byte rather than string

This commit is contained in:
gingerBill committed 2019-01-07 23:08:38 +00:00
1 parent cd2c4c02e1
commit 5af20aa467
5 files changed
+68 -19

No files matched your search

+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: string, spec := Specification.JSON) -> bool {
is_valid :: proc(data: []byte, spec := Specification.JSON) -> bool {
p := make_parser(data, spec, mem.nil_allocator());
if p.spec == Specification.JSON5 {
return validate_value(&p);