CSV stands for Comma-Separated Values. It is a plain-text format used for representing tabular data. In a CSV file, each line represents a row of data and each value within a row is separated by a delimiter, typically a comma. However, other delimiters like semicolons or tabs can also be used.
JSON stands for JavaScript Object Notation. It is a data interchange format used to transmit and store structured data between a server and a web application.
The JSON syntax rules are quite simple, there are two types of elements that make up its structure:
Arrays: ordered lists of values separated by commas. These are written between square brackets [ ].
Example:
Objects: lists of name/value pairs. The name and value are separated by a colon and the pairs are separated by commas. Objects are enclosed in braces { } and pair names are always enclosed in double quotes " ".
Example:
Example of an array of objects:
Reminder:
Values (in both objects and arrays) can be whole numbers, decimals or in exponential notation.
Text strings are enclosed in quotes.
Numeric and Boolean values are written without quotes.