Syntax Rules: Data is in name/value pairs and they are separated by commas. It uses curly brackets to hold the objects and square brackets to hold the arrays.
"Data Structures": [
"Name" : "Trees",
"Course" : "Intoduction of Trees",
"Content" : [ "Binary Tree", "BST",
"Name" : "Graphs",
"Topics" : [ "BFS", "DFS", "Topological Sort" ]
Advantages of JSON:
- It stores all the data in an array so that data transfer makes easier. That’s why it is the best for sharing data of any size even audio, video, etc.
- Its syntax is very small, easy, and light-weighted that’s the reason it executes and responds in a faster way.
- It has a wide range for browser support compatibility with the operating systems. It doesn’t require much effort to make it all browser compatible.
- On the server-side parsing is the most important part that developers want. If the parsing will be fast on the server side then the user can get a fast response, so in this case, JSON server-side parsing is the strong point compared to others.
Disadvantages of JSON:
- The main disadvantage is that there is no error handling. If there was a slight mistake in the script then you will not get the structured data.
- It becomes quite dangerous when you used it with some unauthorized browsers. Like JSON service return a JSON file wrapped in a function call that has to be executed by the browsers if the browsers are unauthorized then your data can be hacked.
- It has limited supported tools that we can use during the development.
Learn More About JSON:
Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above