users@jersey.java.net

[Jersey] Re: how to rename XmlRootElement in JSON

From: Tatu Saloranta <tsaloranta_at_gmail.com>
Date: Thu, 9 Jun 2011 13:45:59 -0700

On Thu, Jun 9, 2011 at 11:42 AM, Maxrunner <joao.rossa_at_gmail.com> wrote:
> Oopps forgot the whole question....:P
> Where do i use the outputstreamwriter? in the context resolver or in the
> resource class to send to jackson?

Wherever you have access to stream (InputStream / OutputStream). But
when using automatic data-binding, it would probably have to be within
MessageBodyReader/Writer.

But easiest thing would really be to use UTF-8 encoding. That is the
default for JSON anyway.

-+ Tatu +-