ASDF value
import std.experimental.allocator.mallocator: Mallocator; import std.experimental.allocator.showcase: StackFront; StackFront!(1024, Mallocator) allocator; auto json = parseJson(`{"ak": {"sub": "subval"} }`, allocator); assert(json["ak", "sub"] == "subval");
Faulty location
import asdf; try { auto data = `[1, 2, ]`.parseJson; } catch(AsdfSerdeException e) { import std.conv; /// zero based index assert(e.location == 7); return; } assert(0);
assert(`{"ak": {"sub": "subval"} }`.parseJson["ak", "sub"] == "subval");
Parses json value