Issues while deserializing exception/throwable using Jackson in Java

前端 未结 6 1796
無奈伤痛
無奈伤痛 2021-02-19 13:42

I am facing issues while deserializing Exception and Throwable instances using Jackson (version 2.2.1). Consider the following snippet:



        
6条回答
  •  死守一世寂寞
    2021-02-19 14:08

    It seems that the output you get in version 2.2.1 is not the same as I get with version 2.2.0 (which according to the website is the latest 2.x version). Besides the latest available 2.x version on the Maven Repository is 2.2.2. So I would try to either downgrade it to 2.2.0 or to upgrade it to 2.2.2. If any of the changes brings you the expected result, I would go further with that version and open a BUG in Jackson's JIRA.

    And of course don't forget

    objectMapper.configure( DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
    

    from Michael's answer.

提交回复
热议问题