fast icon indicating copy to clipboard operation
fast copied to clipboard

how to read single value of a key? /fast/json.d(1208): Assertion failure

Open mw66 opened this issue 5 years ago • 1 comments

import std.stdio;
import fast.json;

void main() {
    auto json = parseTrustedJSON(`{"x":123}`);
    writeln(json.x);  // shall I get 123 here?
}

core.exception.AssertError@/home/xxx/.dub/packages/fast-0.3.5/fast/source/fast/json.d(1208): Assertion failure

mw66 avatar May 16 '20 08:05 mw66

This is a bug in the non-validating parser that is unnesting once too often. I haven't worked on the code in quite a while and don't want to break something, so I want to be in the right mind set first.

mleise avatar May 16 '20 20:05 mleise