I have spring application which expose REST endpoint, lets name it "doAction". As the request it consumes object:
class Person{
private String name;
private String email;
}
Some clients can call this endpoint by passing data with different practice of writing words, like:
Peter_1
name = Peter
email = peter@gmail.com (lower case)
Mark_2
name = mark
email = MARK@gmail.com (upper case)
Julia_3
name = julia
email = JuliaToward@gmail.com (camel case)
Is there some approach to force all income data be parsed to lowercase(lets assume all fields are Strings)?
So as a result I desire to have:
Peter_1
name = peter
email = peter@gmail.com
Mark_2
name = mark
email = mark@gmail.com
Julia_3
name = julia
email = juliatoward@gmail.com
Solution for Jackson is appreciated.