Hello and welcome again.
A very good advantage of using JSON is how easy it can be to read.
With that single line command, you can access anything from the object data. So, say you were to get the name value, all you would do is simply type:
userInfo.name; // Using the dot notation.
userInfo[“name”] // Using the bracket notation
Another good advantage is that it is leaner than XML. When you try to run the same command or script using XML, you would observe that passing an XML can be time consuming whereas with JSON, it is much faster.
Let’s take a look at how JSON strings are written.
There are quite some tools you can use to validate your JSON code and some of them are listed below:
â€¢ JSON Editor Online
â€¢ Cocoa JSON Editor (MAC)
â€¢ JSON view for Mozilla and Chrome etc.