json-iterator / java

jsoniter (json-iterator) is fast and flexible JSON parser available in Java and Go
http://jsoniter.com/
MIT License
1.51k stars 518 forks source link

tomcat9解析jsonarray报错 #193

Closed 853103174 closed 6 years ago

853103174 commented 6 years ago

eclipse+tomcat9开发环境没有问题,项目打成war包放到tomcat9里面报错

com.jsoniter.spi.JsonException: readStringSlowPath: invalid unicode character, head: 115, peek: ,"goods":", buf: [{"number":null,"referencePrice":null,"purchaseDate":"2018-06-17","marketPlan":null,"purchaseQuantity":50,"goods":"芒果","id":1},{"number":null,"referencePrice":null,"purchaseDate":"2018-06-17","marketPlan":null,"purchaseQuantity":60,"goods":"黄瓜","id":2},{"number":null,"referencePrice":null,"purchaseDate":"2018-06-17","marketPlan":null,"purchaseQuantity":120,"goods":"黄油桃","id":3}] at com.jsoniter.JsonIterator.reportError(JsonIterator.java:136) at com.jsoniter.IterImpl.readStringSlowPath(IterImpl.java:288) at com.jsoniter.IterImplString.parse(IterImplString.java:94) at com.jsoniter.IterImplString.readString(IterImplString.java:64) at com.jsoniter.JsonIterator.readString(JsonIterator.java:206) at com.jsoniter.any.StringLazyAny.fillCache(StringLazyAny.java:128) at com.jsoniter.any.StringLazyAny.toString(StringLazyAny.java:120) at pss.produce.controller.ProduceController.sendWeChat(ProduceController.java:106) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at com.jfinal.aop.Invocation.invoke(Invocation.java:73) at com.jfinal.core.ActionHandler.handle(ActionHandler.java:78) at pss.login.LoginHandler.handle(LoginHandler.java:27) at com.jfinal.ext.handler.FakeStaticHandler.handle(FakeStaticHandler.java:58) at com.jfinal.core.JFinalFilter.doFilter(JFinalFilter.java:73) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:494) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:651) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:412) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:754) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1385) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:748)

853103174 commented 6 years ago

环境:Java8+jsoniter-0.9.22

taowen commented 6 years ago

only utf-8 is supported

853103174 commented 6 years ago
853103174 commented 6 years ago

<Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" URIEncoding="utf-8" />