On Mon, 7 Apr 2014, Jeremy Ruston wrote:

To get the tiddler back as a tiddler in JSON form it needs to put
with a 'type' field that is not application/json.

Ouch. This is tricky.

Is it too late for a single tiddler that contains tiddlers to have a
type of its own like application/tiddlywiki+json? If you then PUT as
application/json with a type of application/tiddlywiki+json you
should be able to get the right thing back.

The tiddler clearly contains JSON data, and so I'd struggle to find a
rationale for making the type field be anything other than
"application/json".

Text tiddlers clearly contain plain text but we call them
text/x-tiddlywiki and text/vnd.tiddlywiki frequently?

Wouldn't any code out there that reads JSON tiddlers expecting the usual
tiddler JSON structure going to get confused by this behaviour if they ever
try to read a tiddler that actually contains JSON?

Apparently this case hasn't come up in the past. The standard way to
store structured data has been to use the existing attributes and
fields _on_ a tiddler, not put structured data _in_ the text field
of the tiddler.

Obviously the aggregate tiddlers-in-a-single-tiddler case doesn't
map well to that. From the server's standpoint this would make the
most sense: what we have here are tiddlers and thats it, none of
these "weird" things that are actually containers of tiddlers. This
buys some granularity of reuse too, in case that's of interest.

Would it be possible to explode the single tiddler to its constituent
tiddlers before PUTting to the server and recompose them on GET
(perhaps by way of transclusion)?

--
Chris Dent                                   http://burningchrome.com/
                                [...]

--
You received this message because you are subscribed to the Google Groups 
"TiddlyWikiDev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/tiddlywikidev.
For more options, visit https://groups.google.com/d/optout.

Reply via email to