Quantcast
Channel: Jackson JSON field mapping capitalization? - Stack Overflow
Viewing all articles
Browse latest Browse all 7

Answer by nutlike for Jackson JSON field mapping capitalization?

$
0
0

Since your setter method is named setMDReqID(…) Jackson assumes the variable is named mDReqID because of the Java naming conventions (variables should start with lower case letters).

If you really want a capital letter use the @JsonProperty annotation on the setter (or - for serialization - on the getter) like this:

@JsonProperty("MDReqID")public void setMDReqID(String MDReqID) {    this.MDReqID = MDReqID;}

Viewing all articles
Browse latest Browse all 7

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>