2 ms·
JSON is a serialization protocol, not a configuration syntax. It's designed to be written/read by machines. It's convenience for humans is that it can be relati
by rswail 6y ago
JSON is a serialization protocol, not a configuration syntax. It's designed to be written/read by machines. It's convenience for humans is that it can be relatively easily be read or written by humans as well.
Protobufs is similarly a serialization protocol combined with an RPC layer for server and client stubs. Its canonical serialization format is binary.
Neither are particularly well suited for human written configuration files. A "JSON without the quotes around keys and allowing Javascript comments and commas at the end of objects or lists and a mechanism to escape multi-line strings" would probably cover most of the required cases.
YAML is an attempt at that, but also attempts to solve a bunch of other problems in a complicated and fault-inducing way (eg, relying on indentation for hierarchy).