I have a POJO class.
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
@JsonIgnoreProperties(ignoreUnknown = true)
public class Sample implements Serializable {
/**
*
*/
private static final long serialVersionUID = 1L;
private int local_id;
private int serverid;
@JsonProperty("local_id")
public int getLocalId() {
return local_id;
}
public void setLocalId(int local_id) {
this.local_id = local_id;
}
@JsonProperty("serverid")
public int getServerId() {
return serverid;
}
public void setServerId(int serverid) {
this.serverid= serverid;
}
}
Request JSON: { "local_id": 1 , "serverid":0 }
While creating the response JSON for the web service , the tags automatically changes from local_id to localId and serverid to serverId.
Response JSON: { "localId ": 1 , "serverId":0 }
Is there any limitation with underscore and are all tag strings change to camelcase tags ?