JSON Example with Data Types Including JSON Array

JSON Example

This article will have all the JSON Examples which covers each and every data type JSON supports. Here is the list of JSON data types.

Valid JSON Data Types

String

Number

Object

Array

Boolean

Null

1. JSON String Example:

{
"firstname": "Tom",
"lastname": "Cruise",
"occupation": "Actor"
}

This example show information about a person, and you know Tom Cruise. This JSON data represent details which contain the string. Play with JSON String Example. String in JSON has to be in double quotes.

2. JSON Number Example:

This example shows how to represent the numbers and I have added the birthday details of Tom Cruise. I have added this in 2018. So you can do the math if this is not 2018. 🙂 Play with JSON Number Example. Numbers in JSON has to be an integer or a floating point.