Java Jackson - prevent float to int conversion when deserializing

前端 未结 3 900
孤独总比滥情好
孤独总比滥情好 2020-12-16 18:27

I have a JSON payload with the following structure ...

{
\"age\": 12
}

... which is mapped to the following class:

public c         


        
3条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-16 18:38

    Toggle off ACCEPT_FLOAT_AS_INT. You can check more details at https://github.com/FasterXML/jackson-databind/wiki/Deserialization-Features

提交回复
热议问题