From mschae’s docs
JSON tree documentation template
 
Change formatting
Line 1: Line 1:
<includeonly>{{#switch: {{{1|[[Category:Pages with invalid template usage/Json]]}}}
<includeonly> {{#if: {{{2|}}}|<span class="nowrap json-key">&nbsp;{{{2}}}</span>|}} {{#if: {{{2|}}}|(|}}{{#switch: {{{1|[[Category:Pages with invalid template usage/Json]]}}}
| object = {}
| object = object
| array = []
| array = array
| int = int
| int = int
| float = float
| float = float
| boolean = boolean
| boolean = boolean
| string = string
| string = string
|}}{{#if: {{{2|}}}|<nowiki></nowiki> <span class="nowrap json-key">&nbsp;{{{2}}}</span>|}}:</includeonly><noinclude>
|}}{{#if: {{{2|}}}|)|}}</includeonly><noinclude>
This template is used to illustrate JSON object trees in documentation.
This template is used to illustrate JSON object trees in documentation.


Line 12: Line 12:
<pre>
<pre>
<div class="treeview">
<div class="treeview">
* {{Json|object}} The object.
* {{Json|object}}: The object.
** {{Json|int|number}} The version number.
** {{Json|int|number}}: The version number.
</div>
</div>
</pre>
</pre>
Line 19: Line 19:
== Example ==
== Example ==
<div class="treeview">
<div class="treeview">
* {{Json|object}} The object.
* {{Json|object}}: The object.
** {{Json|int|version}} The version number.
** {{Json|int|version}}: The version number.
</div>
</div>
</noinclude>
</noinclude>

Revision as of 14:13, 13 October 2025

This template is used to illustrate JSON object trees in documentation.

Usage

<div class="treeview">
* {{Json|object}}: The object.
** {{Json|int|number}}: The version number.
</div>

Example

  • object: The object.
    •  version (int): The version number.