4 ms·
You can have extensible structure and fields with JSON Schema, gRPC, Cap’n Proto, etc. There’s nothing XML-specific about that. The only thing XML gives you ov
by pseudocomposer 2y ago
You can have extensible structure and fields with JSON Schema, gRPC, Cap’n Proto, etc. There’s nothing XML-specific about that.
The only thing XML gives you over any of those formats is unstructured mixing of text and data, which is more a foot-gun than anything. Oh, and of course, being significantly more verbose.
- actionfromafar 2y agoA niche thing maybe, but XML has comments, which I appreciate.
- 0x457 2y agoWhy do you need comments in machine generated files meant for other machines?
- actionfromafar 2y agoIt can be very helpful when trying to figure out why one machine won't understand another, for instance. You can put meta-data in for debugging without compromising anything, schema wise. Or in the case of config files, there can be detailed instructions on what fields are what they should contain. The thing about XML is that it strikes a sweet-spot between machine readable files and human readable files. (I can't believe I'm coming out as an XML apologist!) If it were only "by machines for machines", we wouldn't consider JSON, YaML or XML as much, we'd all go for Protocol Buffers or Parquet or something.