From mschae’s docs
JSON tree documentation template
 
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly>{{#switch: {{{1|[[Category:Pages with invalid template usage/Json]]}}}
<includeonly> {{#if: {{{2|}}}|{{Json key|"{{{2}}}"}}|}}{{#if: {{{2|}}}|&nbsp;(|}}{{#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.


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


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

Latest revision as of 14:01, 15 October 2025

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

Usage

{{Tree view|
* {{Json|object}}: The object.
** {{Json|int|number}}: The version number.
}}

Example

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