3 ms·
That string is a valid JSON document, and it's also a valid YAML document. The problem is that it parses to different values in those two syntaxes.
by jmillikin 2y ago
That string is a valid JSON document, and it's also a valid YAML document.
The problem is that it parses to different values in those two syntaxes.
- Timwi 2y ago> That string is a valid JSON document No it is not?... A valid JSON document cannot start with ` or with '. You could argue that the poster added ` in the hopes of getting it formatted, but not the '.
- jmillikin 2y agoThe string being discussed is: {"a": 1e2} There are no single quotes or backticks in it. Those are an artifact of posting on Hacker News.