5 ms·
We’re using something similar(ish) internally and it’s interesting how much more readable and expressive JSON can get by allowing Rust style constructors/tags f
by sfvisser 3y ago
We’re using something similar(ish) internally and it’s interesting how much more readable and expressive JSON can get by allowing Rust style constructors/tags for your data types.
Suddenly sum types become conveniently easy to express and understand, which is always incredibly awkward in JSON.
Besides that: tuples, tuple structs, comments, properly handling NaN, optional.
Really hope something like this takes over the role of JSON/yaml soon.
- pdimitar 3y agoCan you show examples? What you say is intriguing.
- maxloh 3y agoWhat's worng with YAML? It seems to be the best of the kind I have seen.
- Ygg2 3y agoWhat isn't wrong with YAML? But first a quiz of two YAML documents. Yaml#1 : Yaml#2 : Is any of these two docs valid. If yes, why, if not, why not. Edit: To be succinct (assuming Yaml 1.2), what is wrong with YAML are string types, weird quoting rules, attempts to be JSON, really bizzare user friendliness rules causing really bizzare edge cases, lookahead & lookbehind being essential for Yaml, very context sensitive, and complicated to the Xth degree (where X approaches infinity). Yaml feels like it can't decide whether it wants to be whitespace sensitive (human readable but not editable) or whitespace insensitive (mostly human readable and human editable).
- Ygg2 3y ago9 hours and no solution. And this is second time I post this. Goes to show how surprising YAML is, which is it's worst property.
- lioeters 3y agohttps://noyaml.com/ https://noyaml.com/