3 ms·
> JSON, which is [...] unambiguous about its types With the one exception that with floatig point values the precision is not specified in the JSON spec and th
by msiemens 6y ago
> JSON, which is [...] unambiguous about its types
With the one exception that with floatig point values the precision is not specified in the JSON spec and thus is implementation defined[1] which may lead to its own issues and corner cases. It for sure is better than YAML's 'NO' problem, but depending on your needs JSON may have issues as well
[1]: https://stackoverflow.com/questions/35709595/why-would-you-use-a-string-in-json-to-represent-a-decimal-number https://stackoverflow.com/questions/35709595/why-would-you-u...
- wongarsu 6y agoAlso JSON's complete lack of many commonly used types, and no way to define any new ones.
- mcv 6y agoIsn't that a problem with most of these config languages, though? XML is the only one where I think this might be possible.
- wongarsu 6y agoAllowing you to define types is quite uncommon, but many config languages allow more types than JSON (so more than boolean, number, string, list, dict). Date datatypes are a big one and are provided by about every second JSON variant, in addition to TOML, ION and others.