Android Jackson Post

Asked

Viewed 28 times

1

A Question : I’m trying to do a post, but the Jackson library during the Post doesn’t change the name of the field during serialization, how do I do this with Jackson? My class below :

@JsonIdentityReference
public class Envio {

    @JsonSerialize
    @JsonProperty("value[teste]")
    Long id;

    @JsonSerialize
    @JsonProperty("label[teste]")
    String name;

    public Envio(Long id, String name) {
        this.id = id;
        this.name = name;
    }
} 
  • Jonathan, it would be interesting for you to post the invocation code of the Rest service. And what it consumes, produces.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.