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. 报错:
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:的更多相关文章
- 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 ( ...
- com.fasterxml.jackson.core.JsonParseException: Unexpected character
com.fasterxml.jackson.core.JsonParseException: Unexpected )): was expecting double-quote to start fi ...
- com.fasterxml.jackson.core.JsonParseException: Unrecognized token 'user'
nested exception is com.fasterxml.jackson.core.JsonParseException: Unrecognized token 'user' 可能错误原因: ...
- java.lang.NoClassDefFoundError: com/fasterxml/jackson/core/JsonProcessingException
我从0手动搭建框架,启动tomcat,遇到这个错:java.lang.NoClassDefFoundError: com/fasterxml/jackson/core/JsonProcessingEx ...
- Springmvc4 com/fasterxml/jackson/core/JsonProcessingException
非常感谢: 谭卓博客 springmvc4 json springmvc4 集成hibernate4 出现 NoClassDefFoundError:com/fasterxml/jackson/cor ...
- springmvc java.lang.NoSuchMethodError: com.fasterxml.jackson.core.JsonFactory.requiresPropertyOrdering()Z
在hibernate spring springMVC整合的时候出现下面的情况: WARNING: Exception encountered during context initializatio ...
- 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 ...
- com.fasterxml.jackson.core.JsonGenerationException: Can not write a field name, expecting a value异常
springboot对象返回,一直报生成json异常,经过检查,发现是自己在做xss防护时对出参进行了json的处理(copy代码不可取,囧) 异常信息 这里进行了出参处理了,但实际上只要对入参处理就 ...
- com.fasterxml.jackson工具类
老版本的Jackson使用的包名为org.codehaus.jackson,而新版本使用的是com.fasterxml.jackson. Jackson主要包含了3个模块: jackson-core ...
- com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field 异常
分享牛原创(尊重原创 转载对的时候第一行请注明,转载出处来自分享牛http://blog.csdn.net/qq_30739519) 1.1.1. 前言 近期在使用ObjectMapper对象将jso ...
随机推荐
- 第二章:视图层 - 9:动态生成CSV文件
CSV (Comma Separated Values),以纯文本形式存储数字和文本数据的存储方式.纯文本意味着该文件是一个字符序列,不含必须像二进制数字那样的数据.CSV文件由任意数目的记录组成,记 ...
- 监控MySQL运行状态:MySQLD Exporter
具体监控配置详看这篇文章:https://www.cnblogs.com/sanduzxcvbnm/p/13094580.html 为了确保数据库的稳定运行,通常会关注一下四个与性能和资源利用率相关的 ...
- secureCRT登录ubuntu 报错:`No compatible key-exchange method. The server supports these methods: diffie-hellman`
在VMware虚拟机中安装好ubuntu 20.04,已安装并启动sshd,但是使用secureCRT远程登录时则报错: Key exchange failed. No compatible key- ...
- Intellij IDEA个人常用快捷键
分享一下个人常用快捷键. 说明:字母排序规则遵循字母表(a->z) 快捷键 介绍 ctrl+b 快速打开当前光标处的类或方法 ctrl+d 复制当前光标所在行至下一行 ctrl+e 打开最近的文 ...
- sql 中HAVING函数
select * from <表名> group by<过滤的数据> having <晒选的列名>=<条件> 例 select * from villa ...
- IDEAidea导入Scala包
IDEAidea导入Scala包 一.配置windows的scala的环境变量 二.IDEA导入scala插件 1.如图步骤导入IDEA的scala插件 三.添加本地的scala目录 这时候我们应该在 ...
- Git的使用以及常用命令(详解)
一. 版本控制工具 什么是版本控制系统? 版本控制系统(Version Control System):是一种记录一个或若干文件内容变化,以便将来查阅特定版 本修订情况的系统.版本控制系统不仅可以应用 ...
- 集训队互测2016Unknown(UOJ191)
题目链接 前面部分和lzz的题解是一样的. 首先将输入点(x,y)变为(-y,x)然后,只需找一个向量与(-y,x)的点积最大,即找一个向量在(-y,x)上的投影最长.此时所有的点都是在x轴上方的,容 ...
- Jquery中Trigger()方法
1. $(selector).trigger(event,[param1,param2,...]) 方法触发被选元素标签的指定事件类型 为元素边赋值为true,并触发元素标签的change方法 $(' ...
- Java Timer使用介绍
java.util包下提供了对定时任务的支持,涉及2个类: Timer:定时器类 TimerTask:任务抽象类 使用该定时任务我们需要继承TimerTask抽象类,覆盖run方法编写任务执行代码,并 ...