bug处理记录:com.fasterxml.jackson.core.JsonParseException- Illegal unquoted character ((CTRL()

  本篇文章为你整理了bug处理记录:com.fasterxml.jackson.core.JsonParseException: Illegal unquoted character ((CTRL()的详细内容,包含有 bug处理记录:com.fasterxml.jackson.core.JsonParseException: Illegal unquoted character ((CTRL,希望能帮助你了解 bug处理记录:com.fasterxml.jackson.core.JsonParseException: Illegal unquoted character ((CTRL。

   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: - 向宁的光 -

  
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]

  
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()的详细内容,想要了解更多 bug处理记录:com.fasterxml.jackson.core.JsonParseException: Illegal unquoted character ((CTRL的内容,请持续关注盛行IT软件开发工作室。

郑重声明:本文由网友发布,不代表盛行IT的观点,版权归原作者所有,仅为传播更多信息之目的,如有侵权请联系,我们将第一时间修改或删除,多谢。

留言与评论(共有 条评论)
   
验证码: