What is JSON and Why is it Standard?
JSON (JavaScript Object Notation) is a lightweight data interchange format that is easy for humans to read and write and easy for machines to parse and generate. Today, over 90% of data traffic between REST APIs, mobile apps, and web services happens in JSON format.
JSON vs XML
Compared to the formerly popular XML, JSON uses far fewer characters (smaller file size) and is much more readable. Also, its native compatibility with JavaScript makes it the undisputed leader in web development.
Common JSON Errors
- Leaving a comma after the last element (Trailing comma).
- Not using specific quotes or using single quotes (Standard JSON only accepts double quotes ").
- Quoting boolean values (should be
trueinstead of"true").