Alternative CSV?

I intend to create a RESTful service that will return a custom text format. Given my very large amounts of data, XML / JSON is too verbose. I am looking for a string based text format.

CSV is an obvious candidate. However, I wonder if there is anything better there. The only thing I found during the study: CTX and Field Text .

I am looking for a format that offers the following:

  • Plain text, easy to read
  • itโ€™s very easy to parse most software platforms. Column definition
  • may change without change in software clients

The text in the field looks pretty good, and I could make a specification myself, but I'm curious to know what others did, given that this should be a very old problem. Surprisingly, there is no better standard.

What are your suggestions?

+6
source share
3 answers

I would say that since CSV is a standard, and since everyone under the sun can analyze it, use it.

If I were in your situation, I would use bandwidth and use GZIP + XML, simply because it is so easy to use.

And in this case, you can always require that your users support GZIP and just send it as XML / JSON, as this should have done a pretty good job of removing redundancy over the wire.

+4
source

I am sure that you have already considered this, but I am a fan of tab delimited files (\ t between fields, a new line at the end of each line)

+4
source

You can try YAML, its overhead is relatively small compared to formats like XML or JSON.

Examples here: http://www.yaml.org/

Surprisingly, the text of the website itself is YAML.

+3
source

All Articles