JSON Formatter

JSON Formatter

creates a tree object with coloured highlights by formatting a JSON string or file with the selected indentation level. Now, you can easily recognise the various JSON constructs (objects, arrays and members). If desired, the resulting JSON tree can be accessed by individually collapsing each node. supports 6 indentation levels, including compact (1 line), JavaScript escaped, tab delimited, and 2 spaces, 3 spaces, and 4 spaces.

Describe JSON:

JSON is pronounced "Jason" and stands for "JavaScript Object Notation" (like in the Friday the 13th movies). It is intended to be a concise, human-readable representation of a complicated data structure that enables data exchange between systems.

Why use JSON?

There are numerous benefits to using JSON, including the following:

If properly formatted, it is human readable:-P
Contrary to XML, it doesn't use a full markup structure, making it small.
In all languages, parsing is simple.
JSON libraries are abundant and available for most programming languages.
The data structure is simple to grasp.

Format JSON:


There are only a few guidelines you must follow:

  • Things are contained by the opening and closing brackets.
  • can be used to represent an empty item.
  • The opening and closing square brackets enclose arrays. 
  •  can be used to represent an empty array.
  • A key-value pair that represents a member
  • Double quotations should be used around a member's key. (JavaScript is not necessary for this. Single-quotes are acceptable in several parsers, including JavaScript.)
  • Within an object structure, each member ought to have a distinct key.
  • If a member's value is a string, double quotes must surround it (JavaScript and some parsers will tolerates single-quotes)
  • The true or false literals in lower case are used to express boolean values.
  • Double-precision floating-point representation is used for expressing numerical values. Support for scientific notation
  • Numbers should not have leading zeroes
  • The backslash character must be used to escape "offensive" characters in a string.
  • The null literal, written in lower case, stands in for null values.
  • Dates and other object types should be converted to strings because they are not adequately supported. The parser/client is now accountable for handling this.
  • If it's not the final one, a comma must come after each object's or array's value.

Cookie
We care about your data and would love to use cookies to improve your experience.