[Jersey] Re: Question about using annotations for JSON

From: Pedro Nuno Santos <>
Date: Tue, 5 Aug 2014 10:02:35 +0100

Like this?

@XmlElement(name = "user-activation-code")

Pedro S.

From: John Brooks []
Sent: 04 August 2014 21:29
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!