3 ms·
I believe the main negative he is referring to is that there is no canonical representation for a given document. The input file can be structured to share comm
by demurgos 6y ago
I believe the main negative he is referring to is that there is no canonical representation for a given document.
The input file can be structured to share common keys (in the example above it's `info`) or not. Since both inputs are parsed into the same value it means that writing a printer is harder: you now have the choice between different output representations.
As a comparison, there's not much choice when serializing to JSON - the only variation is around whitespace. When serializing TOML you need more insight to decide what's the best representation for a human. A contributing factor to this issue is that TOML is mostly used for configuration files, so it often matters that the output is readable.