Ask HN: What's your preferred output format?

1 points by k4ch0w ↗ HN
Do you prefer JSON, XML, Plaintext, CSV, XLS, YAML, etc? And why?

4 comments

[ 3.1 ms ] story [ 21.9 ms ] thread
What is it supposed to be the output of? I think that it would depend on that

SQLite includes an extension to deal with JSON, and the command shell can also deal with CSV, and I also wrote a JSON parser in PostScript, so that means it can easily be used with PostScript codes too now, and of course JavaScript also has JSON built-in.

Depends heavily on the data.

If it's human-readable, read-only, and almost completely unstructured, plaintext.

If it's human-readable, read-only, and structured but formatting doesn't matter, HTML.

If it's human-readable, read-only, and formatting matters, PDF.

If it's intended for humans to read and write via hand-editing, and then subsequently have a machine work with, then TOML. (Never YAML.)

If it's fundamentally tabular, CSV. (Never XLS.)

If it's an API result from a web API, reluctantly JSON; as much as I'd prefer TOML, JSON is more universal.

(comment deleted)