1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-14 13:54:50 +00:00
TiddlyWiki5/editions/tw5.com/tiddlers/webserver/TiddlyWeb JSON tiddler format.tid
2018-10-02 14:16:58 +01:00

34 lines
1.1 KiB
Plaintext

created: 20181002130513206
modified: 20181002131123893
tags: [[WebServer Guides]]
title: TiddlyWeb JSON tiddler format
type: text/vnd.tiddlywiki
The web server API uses tiddlers in a special format originally designed for TiddlyWeb:
* Field values are represented as strings. Lists (like the ''tags'' and ''list'' fields) use double square brackets to quote values that contain spaces
* Tiddlers are represented as an object containing any of a fixed set of standard fields, with custom fields being relegated to a special property called ''fields''
* The standard fields are: ''bag'', ''created'', ''creator'', ''modified'', ''modifier'', ''permissions'', ''recipe'', ''revision'', ''tags'', ''text'', ''title'', ''type'', ''uri''
For example, consider the following tiddler:
```
{
"title": "HelloThere",
"tags": "FirstTag [[Second Tag]]",
"my-custom-field": "Field value"
}
```
In transit over the API, the tiddler would be converted to the following format:
```
{
"title": "HelloThere",
"tags": "FirstTag [[Second Tag]]",
"fields": {
"my-custom-field": "Field value"
}
}
```