JavaScript Object Notation (JSON) pronounced as "Jason" is the de facto standard for data interchange on the web these days. It is a simple format that is easier to comprehend than XML. It also has less size than XML because of no closing tags. Interacting with JSON from JavaScript is extremely seamless. JSON format was first specified by Douglas Crockford in the early 2000s
This setting governs whether or not the output is indented. The indented output is easier for humans to comprehend. On the other hand, a non-indented output is compact & smaller in size (best for transmission). So, JSON is often minified which compacts & compresses the output by removing non-essential whitespace. This is the most important use of this tool as people paste the minified JSON and try to understand what's in it via indentation.
{
"name": "John Doe",
"age": 69
}
{"name":"John Doe","age":69}
A valid JSON must have double quotes around the keys (or property names). However, when used directly inside JavaScript, this is not necessary (unless the keys have special characters in them). So, if you intend to use the output directly inside JavaScript, deselect this option.
{"name":"John Doe","age":69}
{name:"John Doe",age:69}
When this option is selected, the casing of keys is converted to lowerCamelCase. This is the default naming convention of JSON fields & JavaScript variables.
{"personName":"John Doe"}
{"PersonName":"John Doe"}
When this option is selected, braces are written on a new line (C# style). Otherwise braces are written on the same line (Java/JavaScript style).
{
"name": "John Doe",
"age": 25,
"addresses":
[
{
"city": "Phoenix",
"country": "Arizona"
},
{
"city": "Miami",
"country": "Florida"
}
]
}
{
"name": "John Doe",
"age": 25,
"addresses": [
{
"city": "Phoenix",
"country": "Arizona"
},
{
"city": "Miami",
"country": "Florida"
}
]
}
Use this setting to remove escape characters in JSON Formatter. This implies that all backslash characters preceding a double quote are removed, thus unescaping the input JSON. This is needed if your JSON input has been escaped and is present in string form.
"{\"personName\":\"John Doe\"}"
{
"personName": "John Doe"
}
"{\"personName\":\"John Doe\"}"
When this option is selected, JSON that is embedded or escaped within string values is processed, expanded & converted to nodes.
{
"name": "John Doe",
"age": 25,
"addresses": [
{
"city": "Phoenix",
"country": "Arizona"
},
{
"city": "Miami",
"country": "Florida"
}
]
}
{
"name": "John Doe",
"age": 25,
"addresses": "[{\"city\":\"Phoenix\",\"country\":\"Arizona\"},{\"city\":\"Miami\",\"country\":\"Florida\"}]"
}
Even though, there is no standard for representing dates in JSON, two popular formats have emerged. The ISO Date Format being the most widely used. If you are using a .NET stack, quite possibly you are using the Microsoft Date Format.
{"systemTime":"2014-01-01T23:28:56.782Z"}
{"systemTime":"\/Date(1388618936782)\/"}
The custom quote character to use for wrapping string values and property names. You can choose between single quote ' and double quote ".
{
"name": "John Doe",
"age": 69
}
{
'name': 'John Doe',
'age': 69
}
Comments 0