Json Options
The configuration options for JSON are listed below. These are similar to Javascript.
The main difference between JSON and Javascript is that the key values in JSON will all be represented as String values with "".
Number Convert
The Number Convert option detects if the 'value' is a number and if so will be output without quotes.
e.g. with Number Convert off
[
{
"name": "Monica",
"age": "29"
}
]
And with Number Convert on:
[
{
"name": "Monica",
"age": 29
}
]
Pretty Print
The Pretty Print option controls the pretty printing of JSON.
With no Pretty Print the JSON will be minified:
[{"name":"Monica","age":"29"}]
With Pretty Print enabled the JSON will be generated with the chosen Delimiter.
e.g.
[
{
"name": "Monica",
"age": "29"
}
]
Delimiter
The Delmiter is the value used to space out the JSON indentation. This is only used when Pretty Print has been set to 'on'.
The Delimiter drop down allows you to choose some standard values:
Tab [\t]- use tabs to indent the valuesSpace [ ]- use a single space to indent the valuesCustom Value- use the value in theCustomText box.
Custom
The Custom text box allows you to add any indentation string to use during the Pretty Print formatting.
This would normally be used to add spaces e.g. two spaces or three spaces.
It is possible to use this text area with strings like "..." to generate:
[
...{
......"name": "Monica",
......"age": "29"
...}
]
This would generate invalid JSON but might be useful for some publications or examples.
When the Custom value is a number e.g. 4 then the indentation will use four spaces i.e.
As Object
By default the JSON is generated as an array containing objects with the properties (or keys) using the header names and the values as the cell values.
As Object allows you to generate the JSON as an object with a named property as the array of data e.g.
{
"data": [
{
"name": "Monica",
"age": "29"
}
]
}
Property Name
The Property Name text area can be used to change the name of the property representing the data array in the object.
By default this is data but you can amend it to whatever text you require.
e.g. using my data as the Property Name
{
"my data": [
{
"name": "Monica",
"age": "29"
}
]
}