Jackson throws JsonMappingException on deserialize; demands single-String constructor?

前端 未结 4 1097
夕颜
夕颜 2020-12-03 17:56

Another question, but it relates to this one: Deserializing JSON with Jackson - Why JsonMappingException "No suitable constructor"?

This time I am getting

4条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-03 18:26

    It seems that you are sending to the server a string instead of an object.

    Instead of sending the string to be parsed on the server side, you can do it easier just by sending JSON.parse(stringObject), and Jackson will deserialize it normally as expected.

提交回复
热议问题