Alexander Klimetschek wrote:
> The existing json rendering provided by Sling is tied to JCR items
> anyway, it's not generically implemented based on Resources and
> ValueMaps. So that you have to do it yourself is actually expected.
> Implementation is greatly simplified because of the JSONWriter that is
> available to build proper json based on your data.
The current default json servlet uses the ValueMap and is not tied to
JCR - so as long as own resources are adaptable to a value map or just a
plain map, json rendering should work.

> 
> Right. Supporting (Persistable)ValueMap pays off when you have generic
> servlets or scripts that should be able to handle both JCR and
> Database-based resources.
I'm not 100% sure but I think parts of the current post servlet already
use the persistable value map, so maybe a plain post to database
resources could work. Create and delete of resources does definitly not
work as we don't have an API for this yet.

Carsten
-- 
Carsten Ziegeler
[email protected]

Reply via email to