Home » JSON Example

JSON Example

JSON example can be created by object and array. Each object can have different data such as text, number, boolean etc. Let’s see different JSON examples using object and array.

JSON Object Example

A JSON object contains data in the form of key/value pair. The keys are strings and the values are the JSON types. Keys and values are separated by colon. Each entry (key/value pair) is separated by comma.

The { (curly brace) represents the JSON object.

JSON Array example

The [ (square bracket) represents the JSON array. A JSON array can have values and objects.

Let’s see the example of JSON array having values.

Let’s see the example of JSON array having objects.

JSON Example 1

The XML representation of above JSON example is given below.

JSON Example 2

The XML representation of above JSON example is given below.

Next TopicJSON Object

You may also like