Function parseFromSliceLeaky [src]
Alias for std.json.static.parseFromSliceLeaky
Parses the json document from s and returns the result.
Allocations made during this operation are not carefully tracked and may not be possible to individually clean up.
It is recommended to use a std.heap.ArenaAllocator or similar.
Prototype
pub fn parseFromSliceLeaky( comptime T: type, allocator: Allocator, s: []const u8, options: ParseOptions, ) ParseError(Scanner)!T
Parameters
T: type
allocator: Allocator
s: []const u8
options: ParseOptions
Source
pub fn parseFromSliceLeaky(
comptime T: type,
allocator: Allocator,
s: []const u8,
options: ParseOptions,
) ParseError(Scanner)!T {
var scanner = Scanner.initCompleteInput(allocator, s);
defer scanner.deinit();
return parseFromTokenSourceLeaky(T, allocator, &scanner, options);
}