Hi Chris

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

That's a useful distinction. So, TW5 wants to PUT/GET a representation of
tiddlers that is always JSON, regardless of the type(s) that they contain.

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


But doesn't that add up to the rule *not* being followed because of the
inconsistent treatment of tiddlers that contain application/json?


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

Does that mean that TW5 should always put tiddlers as
application/x-tiddler+json,
regardless of the type field on the tiddler? And would still be able to
pass along the tiddler's type field in the usual way in the body?

Thanks for your patience, I'm sure I'm still misunderstanding what's going
on,

Best wishes

Jeremy


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



-- 
Jeremy Ruston
mailto:[email protected]

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