On Jan 22, 2008 10:31 AM, Peter Svensson <[EMAIL PROTECTED]> wrote:
> ...I personally prefer to just have object within objects. it's
> just that I have to translate the thing to a format that Dojo's Tree widget
> can consume....

Ok, so IIUC Sling's default JSON format is ok, but you'd need a
different dojo-friendly format in addition to it?

If yes that's easy to implement, we could do that with a selector
routed to a specific JSON rendering servlet, i.e. URLs ending in
".dojo.json" would be served with a different format than the stock
.json.

> ....maybe it would be a good idea to have an escaping strategy for
> content inside the json structure. This can be non-trivial, since the
> content can contain client-side js which uses escaping itself, and so on.
>
> The most 'safe' approach would be to urlencode all properties which contain
> this kind of information (i.e. can be showed in the browser), since it is
> trivial to revert it back, and it is supposed to be consumed by javascript
> anyway....

Sounds interesting - is that a JSON standard way of encoding
properties? Do you have references to that?

-Bertrand

Reply via email to