Most certainly not.
CSV is a table format that maps very well to data sets or other tabular data. But not all data is tabular! Most generally, we want to serialize object graphs. This can be difficult in the following cases:
- circular references
- shared subgraphs (e.g. two objects that both contain the same object as a member)
- objects of different types to be serialized to the same document
We further want to be able to reliably de-serialize the objects from our storage format.
XML
Is primarily an extensible markup language. It can be shoe-horned to store general data structures as well. Language support for IDs means that complex graphs can be created, although it's best used for trees. A document can be tested for correctness against a specification. There are various problems with this format that can make it impractical, such as the extreme verbosity.
JSON
Is primarily a way to store simple object trees. There is no support for general graphs. JSON has no concept of type beyond primitives string, integer, float, boolean, null and the collection types array and object.
YAML
Most easily understood as an extension of JSON. Has a notion of aliases that allow object graphs of arbitrary complexity to be created. Has a concept of metadata like tags that can be used for proper typing.
CSV
Has nothing, except a single table. If we want to store object graphs, we would have to use a schema like
#ID,Type,Field1,Field2,...,FieldN
1,String,foo
2,String,bar
3,Array<String>,1,2
There are many dialects of CSV that disagree on delimiters, line terminators, quoting, escape characters, and many other issues that make it unsuitable for general (binary) data. All of this makes it rather difficult to process CSV data.
So basically, easy things are difficult or impossible with CSV when using it as a general serialization format.
This criticism does not apply when using it to store truly tabular data like time sheets or a series of measurements. Here, CSV (often in the variant of tab separated values) is usually more compact and easier to use than the other data formats.