Thanks for the help guys, I like the BadgerFish solution and I am using it
in the new API I'm exposing but the old already works with attributes and I
don't want to chat how client works.
Tatu - can you elaborate on your solution, and give a snippet?
On Thu, Jan 5, 2012 at 21:58, Tatu Saloranta <tsaloranta_at_gmail.com> wrote:
> 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 +-
>
>
>