Let's assume I have the following pojo
class pojo{
String color;
}
I want to deserialize color like so:
{
COLOR: "red"
}
and serialize color like so:
{
color: "red"
}
Let's assume I have the following pojo
class pojo{
String color;
}
I want to deserialize color like so:
{
COLOR: "red"
}
and serialize color like so:
{
color: "red"
}
If you want to change the name of the property when serializing, you can use the
@JsonProperty
annotation like this :@JsonProperty("color1")
LE: Now i've understood what you want. You can use @JsonFormat(with = JsonFormat.Feature.ACCEPT_CASE_INSENSITIVE_PROPERTIES) to accept uppercase attributes.