users@jersey.java.net

[Jersey] Re: Question about using annotations for JSON

From: John Brooks <iresprite_at_gmail.com>
Date: Wed, 6 Aug 2014 14:31:05 -0400

Aha! Perfect! Thank you. I had a bear of a time finding that in the API or
docs.


On Tue, Aug 5, 2014 at 5:02 AM, Pedro Nuno Santos <
pedro-nuno-santos_at_telecom.pt> wrote:

> Like this?
>
>
>
> @XmlElement(name = "user-activation-code")
>
>
>
>
>
> Cheers,
>
> Pedro S.
>
>
>
> *From:* John Brooks [mailto:iresprite_at_gmail.com]
> *Sent:* 04 August 2014 21:29
> *To:* users_at_jersey.java.net
> *Subject:* [Jersey] Question about using annotations for JSON
>
>
>
> Hi, all! I've done a little research on how to deal with JSON keys that
> use hyphens, but most of the answers I see pertain to javascript or some
> other Java library. When I'm creating a POJO for a JSON payload and I'm
> processing JSON in my client code using MOX. How do I deal with the hyphens?
>
>
>
> I've seen solutions for other libraries that use annotations (like
> @JsonProperty("user-activation-code")); is there something similar for
> that in this case?
>
>
>
> Thanks in advance!
>
>
>