JSON Syntax

Valid Key Names in JSON

A valid JSON key name can have all Unicode characters wrapped in double quotes and escaped invalid characters such as double quotation, backslash, and control characters.


JSON Schema

JSON Schema is a grammar language for defining the structure, content, and (to some extent) semantics of JSON objects. It lets you specify metadata (data about data) about what an object’s properties mean and what values are valid for those properties.


JSON with JSONPath

JSONPath is a query language for JSON with features similar to XPath for XML. JSONPath is used for selecting and extracting a sub-section from the JSON document.


JSON with Ajax

Sending JSON request payload and receiving the JSON response object are very common tasks while dealing with AJAX and remote REST APIs. Learn with examples.


JSON Object

The JSON object data type is a list of name-value pairs surrounded in curly braces. Learn to create, modify and delete a JSON object with examples.


JSON Array

JSON Array is a list of items surrounded by square brackets. Each item in the array is separated by a comma.


JSON parse()

JSON parse() method, as the name suggests, deserializes a JSON string representation to a JavaScript object. The JSON string is typically received from a remote location (e.g. API response) and needs to be used for modifying the UI in the browser. The parse() the method takes the JSON string, as …


JSON stringify()

The JSON.stringify() function, as name suggests, converts a JavaScript value to a serialized JSON string. JSON.stringify() can optionally use a replacer function to replace values using custom logic. 1. Syntax The syntax of the JSON.stringify() method is: 1.1. Method Parameters 2. JSON.stringify() Example Program output. 3. JSON.stringify() Replacer Function Example …


JSON Data Types

At the granular level, JSON consists of 6 data types. The first four data types (string, number, boolean and null) can be referred to as simple data types. The other two data types (object and array) can be referred to as complex data types. Let’s learn about each data type …