4 ms·
What are the material differences between a config file format, and a machine-to-machine only format?
by knodi123 7y ago
What are the material differences between a config file format, and a machine-to-machine only format?
- inetknght 7y agoWell, for one: most config file formats specifically include a method for the user to add bytes to the data which won't be parsed or interpreted. In JSON... you might try adding a {"comment": "this is a bad way to comment"} object or key/value and hope you don't collide with an object's dedicated comment field, and also don't cause the parser to raise an error for having a field which it didn't expect.
- korijn 7y agoThe key difference is the target audience. The format's "UX", so to speak, is optimized for the target audience (machine or human). @jrockway makes an excellent point.
- mark-r 7y agoWhy must those be mutually exclusive? There's value in being understandable by both.
- nitrogen 7y agoHaving comments in a "wire format" provides a means for the spec to become meaningless as random applications start using comments to convey information (or exfiltrate data) that other applications cannot parse correctly.
- mark-r 7y agoThere should be a special place in hell reserved for people who use comments to convey machine readable information. The whole point of a comment is to provide something that has no semantic meaning.
- haggy 7y agoConfig files are typically a 'load once, read many" pattern. Machine to machine communication protocols can be VERY high rate and over the network so they need to be highly efficient both in memory footprint and serialization overhead.
- iainmerrick 7y agoSo... JSON isn’t great as a machine to machine protocol, then? So I guess it must be a config format after all!
- robotnikman 7y agoI would think being able to have comments is a big one, so you at lease have an idea of what changes what in a config file.