JSON Introduction
What is JSON?
JSON (JavaScript Object Notation) is a data interchange format that mainly uses stateless applications or features development as an alternative to XML, YAML. It is a subset of JavaScript, which converts JSON data to native JS objects.
JSON mainly creat in two structure
- Collection of name value pairs - It is similar to structure in C/C++. Each element is considered as an object or array or hash table or record etc.
- List of values - Usually it is recognized as an array or sequence or list.
Example of different form of JSON
- Object - Object is key (name) / value pair.
- Array - Array is a list of the same data type values.
- Value - In JSON, value can use object or array or string or number or true or false or null.
- String - In JSON String, any character can be use inside of double quotes. Ex. ' " ' characters ' " '
- Number - Integer, fraction, exponent can be used in JSON, different forms like hexadecimal or octal can pass as a string.
- Whitespace - " ", \n (linefeed), \r (carriage return), \t (horizontal tab) can be use between any key value pair.
JSON is a simple text data format as well as it is not dependent on any language. Many programming languages readily available JSON data processors and generators.
Credits
json.org - Introducing JSON Standard