Json Tutorial

50 %
50 %
Information about Json Tutorial

Published on June 21, 2016

Author: napender

Source: slideshare.net

1. JSON Tutorial JSON: JavaScript Object Notation. JSON is a syntax for storing and exchanging data. JSON is an easier-to-use alternative to XML.

2. JSON Example {"employees":[ {"firstName":"Napendra", "lastName":"Singh"}, {"firstName":"Rahul", "lastName":"Roy"}, {"firstName":"Sam", "lastName":"Jones"} ]}

3. JSON Syntax - Rules JSON syntax is derived from JavaScript object notation syntax: ● Data is in name/value pairs ● Data is separated by commas ● Curly braces hold objects ● Square brackets hold arrays

4. JSON Data - A Name and a Value JSON data is written as name/value pairs. A name/value pair consists of a field name (in double quotes), followed by a colon, followed by a value: Example :- "firstName":"Napendra"

5. JSON Objects JSON objects are written inside curly braces. Example :- {"firstName":"Napendra", "lastName":"Singh"}

6. JSON Arrays JSON arrays are written inside square brackets. Example :- "employees":[ {"firstName":"John", "lastName":"Doe"}, {"firstName":"Anna", "lastName":"Smith"}, {"firstName":"Peter","lastName":"Jones"} ]

7. JSON Files ● The file type for JSON files is ".json" ● The MIME type for JSON text is "application/json"

8. JSON Tutorial ** The End ** By :- Napendra Singh

Add a comment