📜  JSON和CSV之间的区别

📅  最后修改于: 2021-07-05 09:50:34             🧑  作者: Mango

JSON: JSON是指JavaScript对象符号。它是一种与语言无关的,人类可读的语言,其简单易用,并且最常用于基于Web的应用程序中。 JSON扩展名以.json结尾。 JSON是XML的用户友好替代品,因为它轻巧且易于阅读。它支持在服务器上快速执行的数据结构,例如数组和对象以及JSON文档。

CSV: CSV是指逗号分隔的值。它将纯文本保存为一系列值(单元格),并在一系列行(行)中用逗号(,)分隔。 CSV文件实际上可以在文本编辑器中打开并读取。有许多用于读取CSV文件的应用程序,许多语言提供了内置功能,可简化读取/写入CSV格式的操作。这些文件是专业人士在数据分析或可视化中使用的大多数文件。

JSON-vs-CSV

下表是JSON和CSV之间的区别表:

SR.NO JSON CSV
1. JSON stands for JavaScript Object Notation. CSV stands for Comma separated value.
2. It is used as the syntax for storing and exchanging the data. It is a plain text format with a series of values separated by commas.
3. JSON file saved with extension as .json. CSV file saved with extension as .csv.
4. It is more versatile. It is less versatile.
5. It is used for for key, value store and supports arrays, objects as values. It is a standard of saving tabular information into a delimited text file.
6. It mainly uses the JavaScript data types. It does not have any data types.
7. It is less secured.  It is more secured.
8. It consumes more memory as compared to CSV. It consumes less memory.
9. It support a lot of scalability in terms of adding and editing the content.  It does not support a lot in terms of scalability.
10. It is less compact as compared to CSV file . It is more compact than other file formats.