3 ms·
> We could build such a format on top of JSON (there are probably multiple) Wouldn't a perfectly valid JSON pretty print nuke your values since it could parse
by josefx 5y ago
> We could build such a format on top of JSON (there are probably multiple)
Wouldn't a perfectly valid JSON pretty print nuke your values since it could parse a 128 bit value to double before writing it out again? I wouldn't trust your theoretical format unless it ensured that normal JSON parsers, which are not aware of its requirements, fail to parse it.
- MathMonkeyMan 5y agoThe theoretical format would have to represent the more-specific numbers using strings, e.g. if we want to mimic the edn: {"#ieee754/b64": "123.45"} Nevermind that this takes up way more space, and whatever other problems. If an intermediate parser encounters this, we don't have to worry about its representation of JSON numbers, because our numbers don't involve JSON's.