1. 报错:

com.fasterxml.jackson.core.JsonParseException: Illegal unquoted character ((CTRL-CHAR, code 9)): has to be escaped using backslash to be included in string value at [Source: (PushbackInputStream); line: 2, column: 21]

2. 导致原因:

测试时是使用swagger测试接口的,下面的 bin 字段的值是复制过来的,bin 的值表面上看是有 空格 的存在,其实是一些 特殊字符, 删除掉特殊字符就可以解决报错了。

向接口中传递json如下

{
"bin": "B10-41-03 ", // 此字段值存在特殊字符问题导致的报错
"equipment": "RF",
"invtype": "T",
"isrecount": 0,
"uname": "RFShuyy",
"whnum": "DA1H"
}

3. 总结:

字段的值中,若存在 JsonUtil 无法识别的 特殊字符 时,或是后台接收数据对象的数据结构与传入json不一致导致的无法转换,会出现该报错。

只要仔细对照 接口中参数对象 及 传入的json,就可以解决此bug

bug处理记录:com.fasterxml.jackson.core.JsonParseException: Illegal unquoted character ((CTRL-CHAR, code 9)): has to be escaped using backslash to be included in string value at [Source:的更多相关文章

  1. Caused by: com.fasterxml.jackson.core.JsonParseException: Unrecognized token 'name': was expecting ('true', 'false' or 'null')

    Caused by: com.fasterxml.jackson.core.JsonParseException: Unrecognized token 'name': was expecting ( ...

  2. com.fasterxml.jackson.core.JsonParseException: Unexpected character

    com.fasterxml.jackson.core.JsonParseException: Unexpected )): was expecting double-quote to start fi ...

  3. com.fasterxml.jackson.core.JsonParseException: Unrecognized token 'user'

    nested exception is com.fasterxml.jackson.core.JsonParseException: Unrecognized token 'user' 可能错误原因: ...

  4. java.lang.NoClassDefFoundError: com/fasterxml/jackson/core/JsonProcessingException

    我从0手动搭建框架,启动tomcat,遇到这个错:java.lang.NoClassDefFoundError: com/fasterxml/jackson/core/JsonProcessingEx ...

  5. Springmvc4 com/fasterxml/jackson/core/JsonProcessingException

    非常感谢: 谭卓博客 springmvc4 json springmvc4 集成hibernate4 出现 NoClassDefFoundError:com/fasterxml/jackson/cor ...

  6. springmvc java.lang.NoSuchMethodError: com.fasterxml.jackson.core.JsonFactory.requiresPropertyOrdering()Z

    在hibernate spring springMVC整合的时候出现下面的情况: WARNING: Exception encountered during context initializatio ...

  7. Java——使用ObjectMapper.writeValueAsString时报错The type com.fasterxml.jackson.core.JsonProcessingException cannot be resolved. It is indirectly referenced from required .class files

    报错信息: The type com.fasterxml.jackson.core.JsonProcessingException cannot be resolved. It is indirect ...

  8. com.fasterxml.jackson.core.JsonGenerationException: Can not write a field name, expecting a value异常

    springboot对象返回,一直报生成json异常,经过检查,发现是自己在做xss防护时对出参进行了json的处理(copy代码不可取,囧) 异常信息 这里进行了出参处理了,但实际上只要对入参处理就 ...

  9. com.fasterxml.jackson工具类

    老版本的Jackson使用的包名为org.codehaus.jackson,而新版本使用的是com.fasterxml.jackson. Jackson主要包含了3个模块: jackson-core ...

  10. com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field 异常

    分享牛原创(尊重原创 转载对的时候第一行请注明,转载出处来自分享牛http://blog.csdn.net/qq_30739519) 1.1.1. 前言 近期在使用ObjectMapper对象将jso ...

随机推荐

  1. 官方文档采用Docker方式安装

    官方文档地址:https://github.com/grafana/loki/tree/master/production The Docker images for Loki and Promtai ...

  2. do...while循环体

    基本语法 不要忘记while()后还需要加分号!!! 例(输出五句hello): int i = 1; //循环变量初始化 int max = 5; //循环的最大次数 do{ printf(&quo ...

  3. oracle中的行转列,列转行

    行转列:源表: 方法1:case when select y,sum(case when q=1 then amt end) q1,sum(case when q=2 then amt end) q2 ...

  4. 2022-08-05-欢迎使用_Typecho

    layout: post cid: 1 title: 欢迎使用 Typecho slug: start date: 2022/08/05 14:21:51 updated: 2022/08/05 14 ...

  5. .net lambda表达式合并

    事情的起因是公司一个小伙子问了我个问题 "海哥,来帮我看下这段代码怎么不行" Func<Report,bool> nameFilter = x=>x.Name = ...

  6. 实现etcd服务注册与发现

    转载自:实现etcd服务注册与发现 0.1.目录结构 . ├── api │   └── main.go ├── common │   └── common.go ├── docker-compose ...

  7. 2.-url和视图函数

    一.URL-结构 1.定义:统一资源定位符 Uniform Resource Locator 2.作用:用来表示互联网上某个资源地址 3.URL的一般语法格式为(注:[]代码其中的内容可以省略): 格 ...

  8. centos 7.6镜像_Centos7 配置本地yum源为iso镜像

    创建挂载路径 sudo mkdir /media/iso 挂载ISO镜像到目录 sudo mount -o loop CentOS-7-x86_64-Minimal-1810.iso /media/i ...

  9. Python--网络编程学习笔记系列01 附实战:udp聊天器

    Python--网络编程学习系列笔记01 网络编程基本目标: 不同的电脑上的软件能够实现数据传输 网络编程基础知识: IP地址: 用来在网络中标记一台电脑  网络号+主机号(按网络号和主机号占位分类A ...

  10. JS 学习笔记(二)Ajax的简单使用

    使用Ajax访问本地TXT文件 ajax.js // 创建请求对象 var ajax = new XMLHttpRequest(); // 建立连接 ajax.open('get', 'test.tx ...