The jsontiddlers macro returns the fields of a selection of tiddlers in JSON form.
An example can be seen in the template tiddler for JSON exports.