I'd describe it as JSON-like with much more flexible syntax and the ability to reference itself.
TOML: Tom's Obvious Minimal Language
71–80 of 229 posts
Re: TOML: Tom's Obvious Minimal Language
#72I pretty like the idea of a superset of JSON that supports (1) comments, (2) trailing commas, (3) unquoted properties, (4) optional {} for the root object, (5) multi-line strings, (6) number separator. JSON6 proposal [1] supports all of this, except (4). Unfortunately it also supports more and make the spec a bit too complex for my taste (JSON has a compact spec; any extension should honor this). Same issue with JSON…
Let me introduce you to our lord and savior: YAML. ;)
Yaml is one of the worst config languages.
Re: TOML: Tom's Obvious Minimal Language
#73JSON is basically perfect if it allowed trailing commas and comments. TOML is not a replacement for JSON because of how badly it chokes on nested lists of objects (being both hard to read and hard to write), due to a misguided attempt to avoid becoming JSON-like[1]. [1] https://github.com/toml-lang/toml/issues/516
> JSON is basically perfect Until you realize you can't actually store real integers because every number in js is a float...
It’s not ideal, but 2^64 integers is also finite.
Re: TOML: Tom's Obvious Minimal Language
#74Funny thing: TOML author/inventor calls it a mistake: > TOML is a bad file format. It looks good at first glance, and for really really trivial things it is probably good. But once I started using it and the configuration schema became more complex, I found the syntax ugly and hard to read. > I personally abandoned TOML and as such, I'm not planning on adding any new features > If you're still reading, I'd like to pu…
Someone called Martin is the "author/inventor" of "Tom's Obvious Minimal Language"?
Re: TOML: Tom's Obvious Minimal Language
#75JSON is basically perfect if it allowed trailing commas and comments. TOML is not a replacement for JSON because of how badly it chokes on nested lists of objects (being both hard to read and hard to write), due to a misguided attempt to avoid becoming JSON-like[1]. [1] https://github.com/toml-lang/toml/issues/516
> JSON is basically perfect Until you realize you can't actually store real integers because every number in js is a float...
Re: TOML: Tom's Obvious Minimal Language
#76Earlier quoted context omitted.
Let me introduce you to our lord and savior: YAML. ;)
Ah yes, the language where a string can magically become a boolean and cause an error. And you can never be sure what is legal because of so many changes in parsing legality between versions. Yaml is one of the worst config languages.
Re: TOML: Tom's Obvious Minimal Language
#77JSON is basically perfect if it allowed trailing commas and comments. TOML is not a replacement for JSON because of how badly it chokes on nested lists of objects (being both hard to read and hard to write), due to a misguided attempt to avoid becoming JSON-like[1]. [1] https://github.com/toml-lang/toml/issues/516
> JSON is basically perfect Until you realize you can't actually store real integers because every number in js is a float...
Re: TOML: Tom's Obvious Minimal Language
#78JSON is basically perfect if it allowed trailing commas and comments. TOML is not a replacement for JSON because of how badly it chokes on nested lists of objects (being both hard to read and hard to write), due to a misguided attempt to avoid becoming JSON-like[1]. [1] https://github.com/toml-lang/toml/issues/516
The problem with comments in configuration files is that they don't survive a `load -> native object -> save` round-trip.
Re: TOML: Tom's Obvious Minimal Language
#79JSON is basically perfect if it allowed trailing commas and comments. TOML is not a replacement for JSON because of how badly it chokes on nested lists of objects (being both hard to read and hard to write), due to a misguided attempt to avoid becoming JSON-like[1]. [1] https://github.com/toml-lang/toml/issues/516
If you parse JSON as YAML you can add comments! YAML is a proper superset of JSON.
Re: TOML: Tom's Obvious Minimal Language
#80Earlier quoted context omitted.
> JSON is basically perfect Until you realize you can't actually store real integers because every number in js is a float...
JSON allows you to store arbitrarily large integers/floats. It's only in JS this is a problem, not if you use JSON in languages that support larger (than 54-bit) integers.