JSON Basics Tutorial
JSON - Examples
JSON Useful Resources
Selected Reading
- JSON - Comparison with XML
- JSON - Schema
- JSON - Objects
- JSON - DataTypes
- JSON - Syntax
- JSON - Overview
- JSON - Home
JSON - Examples
JSON Useful Resources
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
JSON - Syntax
JSON - Syntax
Let s have a quick look at the basic syntax of JSON. JSON syntax is basically considered as a subset of JavaScript syntax; it includes the following −
Data is represented in name/value pairs.
Curly braces hold objects and each name is followed by : (colon), the name/value pairs are separated by , (comma).
Square brackets hold arrays and values are separated by ,(comma).
Below is a simple example −
{ "book": [ { "id": "01", "language": "Java", "edition": "third", "author": "Herbert Schildt" }, { "id": "07", "language": "C++", "edition": "second", "author": "E.Balagurusamy" } ] }
JSON supports the following two data structures −
Collection of name/value pairs − This Data Structure is supported by different programming languages.
Ordered pst of values − It includes array, pst, vector or sequence etc.