Jackson Not Overriding Getter with @JsonProperty

前端 未结 10 2260
醉话见心
醉话见心 2021-02-12 06:23

JsonProperty isn\'t overriding the default name jackson gets from the getter. If I serialize the class below with ObjectMapper and jackson I get

<
10条回答
  •  孤街浪徒
    2021-02-12 06:36

    I know its an old question but for me I got it working when I figured out that its conflicting with Gson library so I had to use @SerializedName("name") instead of @JsonProperty("name") hope this helps

提交回复
热议问题