| ... | @@ -25,9 +25,13 @@ pub fn parse(alloc: std.mem.Allocator, path: string, inreader: anytype) anyerror | ... | @@ -25,9 +25,13 @@ pub fn parse(alloc: std.mem.Allocator, path: string, inreader: anytype) anyerror |
| 25 | p.extras.appendAssumeCapacity(@intFromEnum(Value.Tag.false)); | 25 | p.extras.appendAssumeCapacity(@intFromEnum(Value.Tag.false)); |
| 26 | _ = try p.addStr(alloc, ""); | 26 | _ = try p.addStr(alloc, ""); |
| 27 | | 27 | |
| | 28 | const root = try parseElement(alloc, &p); |
| | 29 | if (p.avail() > 0) return error.JsonExpectedTODO; |
| | 30 | const data = try p.extras.toOwnedSlice(alloc); |
| | 31 | |
| 28 | return .{ | 32 | return .{ |
| 29 | .root = try parseElement(alloc, &p), | 33 | .root = root, |
| 30 | .extras = try p.extras.toOwnedSlice(alloc), | 34 | .extras = data, |
| 31 | }; | 35 | }; |
| 32 | } | 36 | } |
| 33 | | 37 | |