users@jaxb.java.net

RE: supporting json schema in JAXB

From: KARR, DAVID <dk068x_at_att.com>
Date: Mon, 31 Mar 2014 16:42:19 +0000

> -----Original Message-----
> From: nirali_unique_at_yahoo.co.in [mailto:nirali_unique_at_yahoo.co.in]
> Sent: Monday, March 31, 2014 9:13 AM
> To: users_at_jaxb.java.net
> Subject: supporting json schema in JAXB
>
> Hi All,
>
> I am currently using JAXB for my XML schema to POJO generation.
>
> I wanted to use it for JSON schema to POJO generation as well.
>
> Is that a feature in JAXB, or can it be done through JAXB?
>
> Thanks.

I don't know what you mean by "JSON schema", but you can use the Jackson framework to marshal/unmarshal JSON with JAXB annotated-classes. If you're using a JAX-RS implementation like CXF or Jersey, then it will do all of this transparently (although I don't know whether Jersey uses Jackson underneath).