JSON and BSON learn to code playlist Valid JSON data can be in two different formats:
A collection of key-value pairs enclosed by a pair of curly braces {...}.
A collection of an ordered list of key-value pairs separated by comma (,) and enclosed by a pair of square brackets [...]
Suppose you are coming from a JavaScript developer background. In that case, you may feel like the JSON format and JavaScript objects (and array of objects) are very similar. But they are not. We will see the differences in detail soon.
The structure of the JSON format was derived from the JavaScript object syntax. That's the only relationship between the JSON data format and JavaScript objects.
JSON is a programming language-independent format. We can use the JSON data format in Python, Java, PHP, and many other programming languages.