Hacker News new | past | comments | ask | show | jobs | submit login

Thank you (and @marcoperaza) for unpacking things a bit. I was mostly unaware of the sideband technologies that go along with the basic tag and attribute structure, and your comments about the community and "guilt by association" got me thinking about library support and other practicalities which I hadn't been considering. Thanks :)

This also got me reading up on various structured-data formats: XML, YAML, JSON, TOML, HCL, etc. I'd really like some big table comparing various features but can't seem to find anything of the sort.

I found a link [0] that has comparisons between JSON, TOML and YAML representations for various types of data. It's neat to see how each becomes more or less verbose depending on the kind of data getting encoded.

[0]: https://gohugohq.com/howto/toml-json-yaml-comparison/

edit: I found a table:

https://en.wikipedia.org/wiki/Comparison_of_data_serializati...




JSON should only really be used in a machine-to-machine context i.e. for serialization. If you want something that's easily editable with a text-editor then use YAML. XML is horrible for hand-editing, but is easier to read than either YAML or JSON and is super flexible, and has heaps of support in terms of tooling and libraries, and is well understood, so it's great for information interchange. Issues around verbosity aren't a huge issue for machines and again this verbosity is actually helpful when doing data-integration. Concerns about wasting space are spurious since any redundancy in data can easily be done away with with some basic data compression, and as somebody else mentioned, xpath is actually pretty good, and makes the verbosity actually a net positive for certain applications.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: