JSON Validator

What is JSON?

JSON stands for JavaScript Object Notation. JSON is an open-standard file format that is used to store human-readable text with key-value pairs and arrays. It is lightweight for storing the value and easy to understand.

The format of JSON code is similar to JavaScript Objects. So, the JavaScript code script can easily convert JSON data into native JavaScript objects because of this similarity.JSON Syntax Rules

  • Data is in key/value pairs
  • Data is separated by commas
  • Square brackets ([ ]) hold an arrays
  • Curly braces ({ }) hold an objects

JSON Sample Data

{
    	"web": {
    		"languages": [
    			{
    				"id": "1",
    				"name": "PHP",
    				"website": "https://www.php.net/"
    			},
    			{
    				"id": "2",
    				"name": "Python",
    				"website": "https://www.python.org/"
    			},
    			{
    				"id": "3",
    				"name": "Java",
    				"website": "https://www.java.com/en/"
    			}
    		]
    	}
}

JSON Key/Value Pairs

"name": "Robert"

JSON Objects

{ "firstName": "Robert", "lastName": "Sin" }

JSON Array

"students":[
    { "firstName": "Barry", "lastName": "Allen" },
    { "firstName": "John", "lastName": "Wick" }
    { "firstName": "Robert", "lastName": "Sin" },
]