public class Test {
    
    private String name;

    @JsonProperty("a")
    public String getName() {
        return name;
    }
    
    @JsonProperty("b")
    public void setName(String name) { this.name = name; }}Copy the code

JsonProperty on the set and GET methods specifies the deserialized and serialized field names, respectively

If the value of name is test then it can be deserialized with “{“b”:”test”} and the output of the serialization is “{“a”:”test”}”