JSON is the best of both worlds with respect to CSV and XML. It's simple and compact like CSV, but supports hierarchical data like XML. Unlike XML, JSON formats are only about twice as large as CSV formats.
The REST architecture allows API providers to deliver data in multiple formats such as plain text, HTML, XML, YAML, and JSON, which is one of its most loved features.
Contents. JSON – JavaScript Object Notation. XML – Extensible Markup Language. CSV – Comma Separated Values.
About JSON format JSON-formatted files have several benefits over CSV: JSON maintains hierarchical structures, making it easier to hold related data in a single document and represent complex relationships.
We're currently planning a new API
for an application and debating the various data formats we should use for interchange. There's a fairly intense discussion going on about the relative merits of CSV
, JSON
and XML
.
Basically, the crux of the argument is whether we should support CSV
at all because of the lack of recursion (i.e. having a document which has multiple authors
and multiple references
would require multiple API calls
to obtain all the information
).
In the experiences you may have had when working with information from Web APIs
and things we can do to make the lives easier for the developers working with our API
.
Our decision:
We've decided to provide
XML
andJSON
due to the difficulty in recursion inCSV
needing multiple calls for a single logical operation.JSON
doesn't have a parser inQt
andProtocol Buffers
doesn't seem to have anon-alpha PHP
implementation so they are out for the moment too but will probably be supported eventually.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With