JSON stands for JavaScript Object Notation, It is a format for storing and transporting data, It’s often used when data is sent from a server to a web page. The JSON syntax is derived from JavaScript object notation syntax, but the JSON format is text only. the code that generates JSON data can be written in any programming language, not only JavaScript.
To help you understand the topic more, I got a JSON syntax example from W3schools. The example defines an employees object: an array of 3 employee records (objects):
JSON Example.
As you can see, the JSON syntax is identical to the syntax of JavaScript objects. that’s why a JavaScript program can easily convert JSON data into native JavaScript objects.
JSON objects are written inside curly braces, just like in regular JavaScript.
JSON Object.
JSON arrays are written inside square brackets. Just like in regular JavaScript JSON arrays can contain objects. Take a look at the example below:
JSON Array.
#web-development #javascript #json #programming #developer