On Thu, Jan 5, 2012 at 11:08 AM, John Yeary <johnyeary_at_gmail.com> wrote:
> Have you looked at BadgerFish for encoding your JSON objects? The
> JAXBContext can be configured to use BadgerFish which handles XML
> attributes and values. I think that BadgerFish uses @ symbols so you may
> need to change that. It does however encode both attributes and elements
> correctly.
>
Alternatively, you could simplify things by using POJO mapping -- since
JSON has no attribute/element distinction, it's much simpler to just ignore
those.
This does not affect XML side since it would still use JAXB which
differentiates between the cases, but there's really no direct connection
between XML and JSON bindings: even when using conventions like Badgerfish,
workflows are fully separate.
-+ Tatu +-