Hi Christophe,

On Wed, Jun 18, 2008 at 1:42 PM, Christophe Lombart
<[EMAIL PROTECTED]> wrote:
> ...I would like to modify the Json rendering. I want to add the node path &
> name. What is the best way to extend the JsonServlet for this kind of
> requirements ?...

The JSON rendering is done by the DefaultGetServlet, which is
hardwired to use the JsonRendererServlet for .json extensions.

If you create a Servlet that extends JsonRendererServlet, and register
it in the same way than the DefaultGetServlet, with an additional

  @scr.property name="sling.servlet.extensions" value="json"

it should be used for .json requests instead of the DefaultGetServlet.

Note that JsonRendererServlet does not currently provide an easy way
to replace just the node-dumping method, we might need to refactor it
to make that easier.

-Bertrand

Reply via email to