3 ms·
Yup, use object notation for passing around objects, use a markup language for markup. It's almost like reading the names gives a hint as to what it was designe
by beatgammit 7y ago
Yup, use object notation for passing around objects, use a markup language for markup. It's almost like reading the names gives a hint as to what it was designed for and probably best at.
My sniff test is that if you're editing it by hand, JSON is a poor format because you'll want the benefit of a schema or at least a user-friendly format. If you're not, the syntax doesn't really matter so we should evaluate it on technical merits (verbosity, computational complexity for serialization/deserialization, memory footprint, etc).
I use:
- config file formats for config files (usually TOML or INI format)
- data formats for data (JSON, protocol buffers, etc)
- markup formats (Markdown, XML/HTML) or code for markup
I really don't get why people try to force all use cases onto the same format. Use whatever is well suited for the task, preferring familiarity over unnecessary technical benefits.