In an attempt to appease everyone's tastes in how their JSON is format, templates are available. You can also build your own custom template if you like by following the specs below.
Each template is made up of 27 strings, which are seperated by the "|" pipe character. Each of these strings can contain <br> & <span> tags for formatting.
As JSON can be nested, the correct indentation can be achieved by placing an "[INDENT]" marker in the string. It will call the indent string (1) the correct number of times to achieve proper nesting. The indent is incremented after an opening objects/arrays brace/bracket, and decremented before a closing objects/arrays brace/bracket.
Below is an explination of what each string represents.
- Indent
- Before a colon
- After a colon
- Before a comma
- After a comma
- Before a object key
- After a object key
- Before an object value
- After an object value
- Before a array value
- After a array value
- Before an array value object opening brace
- After an array value object opening brace
- Before an array value object closing brace
- After an array value object closing brace
- Before an object value object opening brace
- After an object value object opening brace
- Before an object value object closing brace
- After an object value object closing brace
- Before an array value array opening bracket
- After an array value array opening bracket
- Before an array value array closing bracket
- After an array value array closing bracket
- Before an object value array opening bracket
- After an object value array opening bracket
- Before an object value array closing bracket
- After an object value array closing bracket
If you have any template that you would like added, shoot me an email.