aboutsummaryrefslogtreecommitdiff
path: root/core/encoding/json/parser.odin
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2019-01-07 23:08:38 +0000
committergingerBill <bill@gingerbill.org>2019-01-07 23:08:38 +0000
commit5af20aa467238ebfdec26dde70429bcb553224db (patch)
tree4eb1e61ec7ca794a3171e527190dd90bc535c04f /core/encoding/json/parser.odin
parentcd2c4c02e1646fc39364857bbee1a6060bd173ac (diff)
Make encoding/json use []byte rather than string
Diffstat (limited to 'core/encoding/json/parser.odin')
-rw-r--r--core/encoding/json/parser.odin4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/encoding/json/parser.odin b/core/encoding/json/parser.odin
index aa041ba5e..374f8589f 100644
--- a/core/encoding/json/parser.odin
+++ b/core/encoding/json/parser.odin
@@ -11,7 +11,7 @@ Parser :: struct {
allocator: mem.Allocator,
}
-make_parser :: proc(data: string, spec := Specification.JSON, allocator := context.allocator) -> Parser {
+make_parser :: proc(data: []byte, spec := Specification.JSON, allocator := context.allocator) -> Parser {
p: Parser;
p.tok = make_tokenizer(data, spec);
p.spec = spec;
@@ -21,7 +21,7 @@ make_parser :: proc(data: string, spec := Specification.JSON, allocator := conte
return p;
}
-parse :: proc(data: string, spec := Specification.JSON, allocator := context.allocator) -> (Value, Error) {
+parse :: proc(data: []byte, spec := Specification.JSON, allocator := context.allocator) -> (Value, Error) {
context.allocator = allocator;
p := make_parser(data, spec, allocator);