问题记录:
调用第三方接口进行json解析时出现了:No serializer found for class cn.hutool.json.JSONNull and no properties discovered to create BeanSerializer (to avoid exception, disable SerializationFeature.FAIL_ON_EMPTY_BEANS) (through reference chain: com.ncist.common.api.vo.Result[“data”]->cn.hutool.json.JSONObject[“data”]->cn.hutool.json.JSONObject[“vehicle_list”]->cn.hutool.json.JSONArray[0]->cn.hutool.json.JSONObject[“vehicle_std_item”]->cn.hutool.json.JSONArray[0]->cn.hutool.json.JSONObject[“desc”])
http-nio-9003-exec-5 20230802 20:20:40.025 ERROR traceId=[] org.apache.catalina.core.ContainerBase.[Tomcat].[localhost].[/logistics].[dispatcherServlet] - Servlet.service() for servlet [dispatcherServlet] in context with path [/logistics] threw exception [Request processing failed; nested

文章讲述了在使用SpringBoot和Hutool进行JSON解析时遇到的Noserializerfoundforclasscn.hutool.json.JSONNull问题,通过将Hutool替换为Fastjson库解决空值转换异常。

3017

被折叠的 条评论
为什么被折叠?



