You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Graeme Dougal <gr...@tiderian.com> on 2014/01/08 17:28:45 UTC
Passing Enum in JSON Body
Hi
I have a rest service with the following path
/element/{id}/elementStatus
I'm calling PUT on this URI in order to change the elementStatus of the
element with the supplied {id}
I have a java Enum ElementStatus that I want to pass in the request body as
JSON, {"elementStatus":"ACTIVE"}
But cant get this to work... using the JacksonJSONProvider and annotating a
factory method with @JSONProducer the String it gets in that method is
simply { (one single open brace)
Any ideas ?
Cheers
Graeme
Re: Passing Enum in JSON Body
Posted by Sergey Beryozkin <sb...@gmail.com>.
Hi
Can you please ask at Jackson lists, you will likely get a better
feedback there
Cheers, Sergey
On 08/01/14 16:28, Graeme Dougal wrote:
> Hi
>
> I have a rest service with the following path
>
> /element/{id}/elementStatus
>
> I'm calling PUT on this URI in order to change the elementStatus of the
> element with the supplied {id}
>
> I have a java Enum ElementStatus that I want to pass in the request body as
> JSON, {"elementStatus":"ACTIVE"}
>
> But cant get this to work... using the JacksonJSONProvider and annotating a
> factory method with @JSONProducer the String it gets in that method is
> simply { (one single open brace)
>
> Any ideas ?
>
> Cheers
> Graeme
>