com.alibaba.fastjson.JSONException: encodeUTF8 error

s5a0g9ez  于 2021-11-27  发布在  Java
关注(0)|答案(4)|浏览(850)

Caused by: com.alibaba.fastjson.JSONException: encodeUTF8 error
at com.alibaba.fastjson.util.IOUtils.encodeUTF8(IOUtils.java:635) ~[fastjson-1.2.29.jar:?]
at com.alibaba.fastjson.serializer.SerializeWriter.encodeToUTF8(SerializeWriter.java:396) ~[fastjson-1.2.29.jar:?]
at com.alibaba.fastjson.serializer.SerializeWriter.writeToEx(SerializeWriter.java:327) ~[fastjson-1.2.29.jar:?]
at com.alibaba.fastjson.JSON.writeJSONString(JSON.java:794) ~[fastjson-1.2.29.jar:?]
at com.alibaba.fastjson.support.spring.FastJsonJsonView.renderMergedOutputModel(FastJsonJsonView.java:180) ~[fastjson-1.2.29.jar:?]
at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:303) ~[spring-webmvc-4.1.9.RELEASE.jar:4.1.9.RELEASE]
at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1243) ~[spring-webmvc-4.1.9.RELEASE.jar:4.1.9.RELEASE]
at org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:1027) ~[spring-webmvc-4.1.9.RELEASE.jar:4.1.9.RELEASE]
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:971) ~[spring-webmvc-4.1.9.RELEASE.jar:4.1.9.RELEASE]
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:893) ~[spring-webmvc-4.1.9.RELEASE.jar:4.1.9.RELEASE]
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:965) ~[spring-webmvc-4.1.9.RELEASE.jar:4.1.9.RELEASE]
... 33 more
Caused by: java.nio.charset.MalformedInputException: Input length = 1
at com.alibaba.fastjson.util.IOUtils.encodeUTF8(IOUtils.java:635) ~[fastjson-1.2.29.jar:?]
at com.alibaba.fastjson.serializer.SerializeWriter.encodeToUTF8(SerializeWriter.java:396) ~[fastjson-1.2.29.jar:?]
at com.alibaba.fastjson.serializer.SerializeWriter.writeToEx(SerializeWriter.java:327) ~[fastjson-1.2.29.jar:?]
at com.alibaba.fastjson.JSON.writeJSONString(JSON.java:794) ~[fastjson-1.2.29.jar:?]
at com.alibaba.fastjson.support.spring.FastJsonJsonView.renderMergedOutputModel(FastJsonJsonView.java:180) ~[fastjson-1.2.29.jar:?]

@wenshao 1.2.29版本使用 出现这个问题

w6mmgewl

w6mmgewl1#

我无法重现问题,需要帮助提供重现问题的case

ogq8wdun

ogq8wdun2#

特殊表情出现的问题比如:🌈❄️💧🏳️‍🌈

vptzau2j

vptzau2j4#

请求 这个问题解决了吗?我也遇到该问题了

相关问题