users@jersey.java.net

[Jersey] Re: How to post only selective fields using the client

From: cowwoc <cowwoc_at_bbs.darktech.org>
Date: Mon, 15 Oct 2012 11:33:13 -0400

Jaco,

     If you *always* wish to suppress certain properties you could try
@JsonIgnore. See http://wiki.fasterxml.com/JacksonAnnotations

     Personally, I've never run into cases where you sometimes want to
serialize some fields, sometimes others. If this is the case, it would
be interesting if you could provide an example.

Gili

On 15/10/2012 11:20 AM, Jaco le Roux wrote:
> Hi,
>
> When POSTing a Java object as JSON to a RESTful service, the entire
> object gets serialized into the request. Is there a way to choose
> which member variables get converted to JSON?
>
> Thanks!