Illegal unquoted character ((CTRL-CHAR, code 13)): has to be escaped using backslash to be included in string value

出现这个错误 是因为使用了 ObjectMapper来转换json字符串,
  请尊重知识,请尊重原创 更多资料参考请见  http://www.cezuwang.com/listFilm?page=1&areaId=906&filmTypeId=1
解决的办法是 1 避免使用这个类
             google 的 Gson gson =new Gson() 就是个替代方案,具体的效率问题不讨论
             2 使用 ObjectMapper mapper=new ObjectMapper();
mapper.configure(JsonParser.Feature.ALLOW_UNQUOTED_CONTROL_CHARS, true);

3 在传入值的时候,去除回车符 换行符 制表符 等

public static boolean isBlankOrNull(String str){  if(null==str)return true;  return str.length()==0;  }  /*** //去除字符串中空格、换行、制表 * @param str* @param pattern* @param replace* @return*/public static String replaceSpecialtyStr(String str,String pattern,String replace){  if(isBlankOrNull(pattern))  pattern="\\s*|\t|\r|\n"; if(isBlankOrNull(replace))  replace="";  return Pattern.compile(pattern).matcher(str).replaceAll(replace);  }

Illegal unquoted character ((CTRL-CHAR, code 13)): has to be escaped using backs相关推荐

  1. 解决Illegal unquoted character ((CTRL-CHAR, code 13)): has to be escaped using backslash to be include

    文章目录 1. 复现问题 2. 分析问题 3. 解决问题 4. 问题总结 1. 复现问题 今天在启动spring boot项目报出如下错误: Exception: Illegal unquoted c ...

  2. BUG(10) : Illegal unquoted character ((CTRL-CHAR, code 13)): has to be escaped using backslash to be

    参考 : https://www.jianshu.com/p/a9a81bb6587f https://annan211.iteye.com/blog/2249146 com.fasterxml.ja ...

  3. Illegal unquoted character ((CTRL-CHAR, code 9)): has to be escaped using backslash to be included i

    Illegal unquoted character ((CTRL-CHAR, code 9)): has to be escaped using backslash to be included i ...

  4. Illegal unquoted character ((CTRL-CHAR, code 10)): has to be escaped using backflash to be included

    2020-10-24 json传html代码时报错:Illegal unquoted character ((CTRL-CHAR, code 10)): has to be escaped using ...

  5. Illegal unquoted character ((CTRL-CHAR, code 10)): has to be escaped using backslash to be included

    filebeat解析stack信息,其中包含换行符,在logstash使用json转换时候报错: Illegal unquoted character ((CTRL-CHAR, code 10)): ...

  6. illegal unquoted character

    异常:illegal unquoted character((CTRL-CHAR,code 10)):has to be escaped using backslash to be included ...

  7. 【Kafka】Illegal unquoted character ((CTRL-CHAR, code 0)): has to be escaped using backs

    1.背景 参考:[Kafka]kafka反序列化数据报错jackson2 JsonParseException: Invalid UTF-8 middle byte 0xc0 我是都统一成UTF-8的 ...

  8. java char的包装对象,Java 从Character和char的区别来学习自动拆箱装箱

    本文结构 1.Character和char 的区别: 2.自动拆箱装箱java 1.Character和char 的区别: Character是类,char基本数据类型.数组 在java中有三个类负责 ...

  9. mongoose 通过账号密码连接 Error: Password contains an illegal unescaped character

    mongoose 远程连接,我的密码有乱七八糟的字符,报错Error: Password contains an illegal unescaped character 报错的 mongodb: 'm ...

最新文章

  1. android高级编程-android高级应用
  2. linux很多程序都要本地编译,让C/C++程序一次编译可以发布到多版本Linux之上
  3. 成电计算机学院保研率,985一条街的街友们,我就想问问电子科技大学(成电)到底是什么水平的学校啊!...
  4. 高性能网站建设的最佳实践(二)
  5. Nginx SSI指令配置详解
  6. 编译过程、静态库和动态库
  7. 记腾讯一面 | 掘金技术征文
  8. eclipse使用git合并_IntelliJ IDEA完整使用教学:从小白到大牛的必经之路!
  9. Ubuntu 14.04卸载安装失败的Mysql数据库,以及重新安装配置
  10. 客户端地图拼图算法解析
  11. HNUCM 1388:高中数学
  12. Maven配置ojdbc14-10.2.0.4.0.jar
  13. Python链家广州二手房的数据爬取--数据爬取
  14. dns配置异常怎么修复_DNS错误怎么办(如何正确设置DNS)
  15. PAT乙级1068 万绿丛中一点红 (20 分)
  16. 浙大翁恺pat练习题_中国大学MOOC-翁恺-C语言-PAT习题及解答-第二周
  17. Unity3D插件 Doozy UI 学习(二):与DoozyUI的事件传递
  18. 【SQLServer】常用时间格式转换
  19. signingConfigs
  20. 前端基础(13):CSS3新增属性和选择器

热门文章

  1. 区分Internet和Local数据流的Qos实现
  2. 【LVGL应用开发--基于STM32】第1章 初识LVGL
  3. Cantor 表 {C语言解法}
  4. 饥荒服务器显示队友mod,饥荒怎么显示物品给队友看 | 手游网游页游攻略大全
  5. 【转】BAT机器学习面试1000题系列(1~50)
  6. PON、EPON、GPON的区别
  7. 15 款 阿里后端开发工具,值得拥有?
  8. Fruit Ripeness论文、代码和数据集汇总
  9. PO: Purchase Order采购订单关键知识点
  10. pyltp的初始化报错:segmentor = Segmentor() # 初始化实例TypeError: __init__(): incompatible constructor argument