Parses the json document from s and returns the result packaged in a std.json.Parsed.
You must call deinit() of the returned object to clean up allocated resources.
If you are using a std.heap.ArenaAllocator or similar, consider calling parseFromSliceLeaky instead.
Note that error.BufferUnderrun is not actually possible to return from this function.
pub fn parseFromSlice(
comptime T: type,
allocator: Allocator,
s: []const u8,
options: ParseOptions,
) ParseError(Scanner)!Parsed(T)
pub fn parseFromSlice(
comptime T: type,
allocator: Allocator,
s: []const u8,
options: ParseOptions,
) ParseError(Scanner)!Parsed(T) {
var scanner = Scanner.initCompleteInput(allocator, s);
defer scanner.deinit();
return parseFromTokenSource(T, allocator, &scanner, options);
}