Reading:  

Getting start with JSON


A bit on JSON Syntax

JSON is based on two structures:

  • It is collection of name / value pair. This is in other languages is realized as record, struct , hash table, keyed list, associative array or object.
  • An ordered list of values. This is in other languages is realized vector, list, sequence or an array. 

The object is unordered set of name/value pairs.

The object begin with

{ (left brace)

and ends with

} (right brace).

Each name is followed by : (colon) and the name/value pairs are separated by , (comma).

Array values are specified within square brackets [ ]

Here is an example for you to better understand JSON syntax.

{
    "Customer": [
    {
       "id":"101",
       "firstName": "Yuvi",
       "lastName": "C"       
    },
    {
       "id":"102",
       "firstName": "Nimrit",
       "lastName": "Chahal"  
    }
 ]
}
 

As you can see, that's pretty much it to get forming your JSON data, in the next part of this tutorial we will explore JSON data types.

Description

In this tutorial you will learn 

  1. What is JSON
  2. Syntax
  3. Datatypes with JSON
  4. Objects
  5. Schema
  6. XML vs JSON
  7. Using with PHP and Java

This tutorial is a quick walkthrough over the technology

 



Learning Objectives

Objective of this tutorial is to give you enough information on JSON to get you started with the technology

Author: Subject Coach
Added on: 20th Jul 2015

You must be logged in as Student to ask a Question.

None just yet!