3 ms·
But this too has significant whitespace, acting as a comma in separating properties. (It's not clear whether you can mix commas and whitespace here.) Also this
by eterm 11y ago
But this too has significant whitespace, acting as a comma in separating properties. (It's not clear whether you can mix commas and whitespace here.)
Also this claims to not need escapes, but it's also not clear how this format handles a comma or a newline in strings without escaping, do they act as a comma to separate properties or do they act as natural commas/newlines?
- PuerkitoBio 11y agoOnly quoteless strings have no escapes, and according to the docs the rule is: > quoteless strings include everything up to the end of the > line, excluding trailing whitespace. (edit: formatting)
- eterm 11y agoSo this { foo:one, bar:two } Parses to "one," because it is a quoteless string? What about true and false, is false the boolean constant or a unquoted string "false".
- PuerkitoBio 11y agoI posted this in another thread here, but it's documented in the linked page: > A value that is a number, true, false or null in JSON is parsed as a value. > E.g. '3' is a valid number while '3 times' is a string.