Created
January 13, 2020 19:28
-
-
Save metaleap/244268f50ab5b466809460ada68becaf to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pub fn FromJson(mem: *std.mem.Allocator, src: []u8) !atem.Prog { | |
var jsonparser = std.json.Parser.init(mem, true); | |
defer jsonparser.deinit(); | |
var jsontree = try jsonparser.parse(src); | |
defer jsontree.deinit(); | |
const rootarr = try as(std.json.Value.Array, std.json.Array, jsontree.root); | |
// defer rootarr.deinit(); | |
return fromJson(mem, rootarr.toSlice()); | |
} |
(std.array_list.AlignedArrayList(std.json.Value,null)) $1 = {
items = {
ptr = 0x00007ffff7fe2828
len = 20
}
len = 12
allocator = 0x00007fffffffde48
}
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
up 1:
p *self: