JSON - Introduction
JSON is a text format for storing and transporting data
JSON is "self-describing" and easy to understand
This example is a JSON string:
It defines an object with 3 properties:
Each property has a value.
let personAge = obj.age;
- JSON is a lightweight data-interchange format
- JSON is used to send data between computers
- JSON is language independent *
Code for reading and generating JSON exists in many programming languages.
The JSON format was originally specified by Douglas Crockford.
Why Use JSON?
Since the format is text only, JSON data can easily be sent between computers, and used by any programming language.
When storing data, the data has to be a certain format, and regardless of where you choose to store it, text is always one of the legal formats.