| ... | ... | @@ -25,9 +25,13 @@ pub fn parse(alloc: std.mem.Allocator, path: string, inreader: anytype) anyerror |
| 25 | 25 | p.extras.appendAssumeCapacity(@intFromEnum(Value.Tag.false)); |
| 26 | 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 | 32 | return .{ |
| 29 | | .root = try parseElement(alloc, &p), |
| 30 | | .extras = try p.extras.toOwnedSlice(alloc), |
| 33 | .root = root, |
| 34 | .extras = data, |
| 31 | 35 | }; |
| 32 | 36 | } |
| 33 | 37 | |