On Wed, 9 Apr 2014, Jeremy Ruston wrote:

This is the bit that I still struggle with. There's still entirely special
behaviour for application/json tiddlers. From the point of view of
TiddlyWiki these tiddlers really are application/json, and not some special
TW variant implied by the special content type. When the user drags in a
.json file from the desktop they get an application/json tiddler
automatically. End users are going to be confused if dragging text/html
content gives them text/html tiddlers, but dragging application/json
content gives them some different type.

Strictly speaking in neither case are they getting text/html nor
application/json, they are getting tiddlers which _contain_ text/html
and application/json. I think this is important.

In the TiddlyWeb context the situation is somewhat different.

The trouble is that I wouldn't expect the existence of a representation
transformation layer to break the basic data store layer protocol of "thou
shall GET what thou PUT".

Actually, that's the rule that is being followed:

    If you PUT something in a JSON container that you are claiming
    is JSON if you ask for JSON back, that's what you get. Same
    thing happens if you PUT something in a JSON container that you
    are claiming is image/png when you ask for image/png back you
    will get an image.

This rule works fine for everything _but_ application/json which is
why I've suggested this change:

* TiddlyWeb extends itself to treat "application/x-tiddler+json" in
  much the same way it treats "application/json" now, deprecating
  but continuing to support the latter.

If that change is made _and_ TW5 starts PUTting and GETting tiddlers
as application/x-tiddler+json, then you will get the results that
you want whatever value you put in the type field of the tiddler.

That change makes the claim of "we've got a thing called a tiddler
_in_ some JSON" and makes no claim on what the tiddler itself is
claiming as its type.

I'm happy to make that change (but it would need to be a few days
from now, not immediately).

However, the same logic that drives that change seems like it might
be sensible for TW5 too, thus why I've brought it up. Up to you
though, I suppose.

--
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