caption: jsontiddler
created: 20210630100923398
modified: 20220427171128693
tags: Widgets
title: JSONTiddlerWidget
type: text/vnd.tiddlywiki

! Introduction

The jsontiddler widget renders the fields of a tiddler to display as a JSON object. The fields of the tiddler can be customised or excluded.

The jsontiddler widget is used in system templates to generate JSON representations of tiddlers for saving. See [[JSON in TiddlyWiki]] for an overview.

! Content and Attributes

The content of the `<$jsontiddler>` widget is ignored.

|!Attribute |!Description |
|tiddler |Optional title of the tiddler from which the fields are to be displayed |
|exclude |Optional space separated list of fields to be excluded |
|escapeUnsafeScriptChars |If set to "yes" then the `<` character will be escaped to the equivalent `\u003C` encoding |
|//{any attributes starting with $}// |Each attribute name (without the leading `$`) specifies a field to be modified with the attribute value providing the value to assign to the field  |

