I have a POST endpoint receiving json in the request body and is mapped to Map<String, Object>
.
The value can be of any string format, I am OK for Spring to auto convert "true"
or "false"
to Boolean
, "123"
to Integer
. But I do not like it to convert "123.456"
to Double
, I want it to leave it as is (String
).
Is there any way (preferably config in application.yml) to selectively stop Spring from auto converting number string in json to Double
only?