with root cause com.alibaba.fastjson.JSONException: not close json text, token :

2018/04/26-16:28:04 [http-nio-8080-exec-1] ERROR org.apache.catalina.core.ContainerBase.[Tomcat].[localhost].[/].[dispatcherServlet]- Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is com.alibaba.fastjson.JSONException: not close json text, token : :] with root cause

com.alibaba.fastjson.JSONException: not close json text, token : :

这个问题的所在是你传入的一个json结构的字符串有没有加{}

String  str="{\"tagJson\":[{\"type\":\"people\",\"tagName\":[\"是的\",\"是的\",\"大多数\"]},{\"type\":\"ADDR\",\"tagName\":[\"俄文\",\"嗯嗯\",\"的索科\"]},{\"type\":\"通用\",\"tagName\":[\"呃呃\",\"嗯嗯\",\"阿卡合法\",\"呃呃\",\"委屈\"]}]}";
如果两边没有加{}的话就会出现这个错误

你可能感兴趣的:(with root cause com.alibaba.fastjson.JSONException: not close json text, token :)