As compared to XML, JSON is smaller, lightweight, faster and easier to parse. JSON is “self-describing” and easy to understand.
- String: double-quoted Unicode, with backslash escaping.
- Boolean: true or false
- Array: an ordered, comma-separated sequence of values enclosed in square brackets; the values do not need to be of the same type.
- Object: an unordered, comma-separated collection of key: value pairs enclosed in curly braces, with the ‘:’ character separating the key and the value; the keys must be strings and should be distinct from each other
- Null: empty
JSON Schema: JSON Schema specifies a JSON-based format to define the structure of JSON data for validation, documentation, and interaction control. A JSON Schema provides a contract for the JSON data required by a given application, and how that data can be modified. JSON Schema is based on the concepts from XML Schema, RelaxNG, and Kwalify, but is JSON-based. The JSON data schema can be used to authenticate JSON data; the same serialization/deserialization tools can be used both for the schema and data. The schema is self-describing. JSON Schema is an Internet Draft, currently version There are several validators available for different programming languages, each with varying levels of conformance.
JSON-RPC: JSON-RPC is an RPC protocol built on JSON, as a replacement for XML-RPC or SOAP. It is a simple protocol that defines only a handful of data types and commands. JSON-RPC allows for notifications and for multiple calls to be sent to the server that may be answered out of order.