From mschae’s docs
Fix unintended space
Add quotation marks around JSON key
Line 1: Line 1:
<includeonly> {{#if: {{{2|}}}|<span class="nowrap json-key">{{{2}}}</span>|}}{{#if: {{{2|}}}|&nbsp;(|}}{{#switch: {{{1|[[Category:Pages with invalid template usage/Json]]}}}
<includeonly> {{#if: {{{2|}}}|<span class="nowrap json-key">"{{{2}}}"</span>|}}{{#if: {{{2|}}}|&nbsp;(|}}{{#switch: {{{1|[[Category:Pages with invalid template usage/Json]]}}}
|object=object
|object=object
|array=array
|array=array

Revision as of 14:18, 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.