JSON validation using JSON Schema

What is JSON?
JSON language is a very simple data transfer methodology used between different web applications.
One of the big problems faced with JSON usage is that there is no proper validation method for this language.
The developers would make assumption that JSON data formats are always valid and there is no need for validation.
This is not really true.
JSON schema is helpful in validating JSON data from both the client and server side.

JSON Schema
JSON Schema is a protocol standard which allows consistent and logical schema for validating JSON data items.
These schemas have well-structured properties inside them along with other objects with their types as follows:


Excluding Properties: type and other properties such as optional, items, maxItems and require could be defined using JSON Schema.

items- This represents items of the array in JSON Schema.

optional- It tells if the property is optional or not.

requires- This denotes that the property is also contained in instance object.

maxItems- This represents count of maximum number of items contained in a collection or an array.