Could not write JSON NullPointerException

卢和昶
2023-12-01

报错:

Could not write JSON: (was java.lang.NullPointerException); nested exception is com.fasterxml.jackson.databind.JsonMappingException: (was java.lang.NullPointerException) (through reference chain: entity["key1"]->entity2["key2"])

解决办法:json转换失败,可以去key2的get方法,看看是不是报异常了。例如报空指针

 类似资料:

相关阅读

相关文章

相关问答