users@jersey.java.net

JAXB to generate JSON

From: Ronak Patel <ronak2121_at_yahoo.com>
Date: Fri, 23 Oct 2009 18:03:16 -0700 (PDT)

Hi All,

I'm aware of the standard way for JAX-RS/Jersey and JAXB to generate JSON as a response to a web service invocation.

I'm also aware that I can send a JAXB Pojo to the Jersey Client API to send JSON to a JSON REST Web Service.

However, I'm wondering...can I ask JAX-RS/Jersey or JAXB to generate a java.lang.String of the JSON given a Pojo in my own code?

If this is possible, how do I do that?

Thanks,

Ronak Patel