Closed Benraay closed 5 years ago
Sorry, the GitHub notification got sent to my spam folder -- I'll look into this a little later this week.
There's a lot of ambiguity here.
{ "key": "xxx"yyy", "key2": "zzz" }
Ideally, we want this to parse to {"key": "xxx\"yyy", "key2": "zzz" }
, but we could also interpret this as {"key": "xxx\"yyy\", \"key2\": \"zzz\" }" }
(e.g., everything was meant to be included in key
).
Depending on context, sometimes the parser will pick the first option, other times the second... this is the nature of ambiguous data. I think making the heuristics more intelligent would require a substantial rewrite of the parser.
This particular bug (parsing to {
) is also due to the parser thinking the last lexeme is a quoted }... so the structure never appears closed. I'll fix this, but the behavior still might not be as expected.
The bug is "fixed" in 0.7.1.. Getting the semantics of this particular parse correct will have to put off until the next major version.
in this test I just removed second quote on coolCSS
{ "key": "<div class="coolCSS>some text</div>" }
when parsing it exports this :"{"
it should only escape like this
{ "key": "<div class=\"coolCSS>some text</div>" }