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

Posted 夜阑听雨

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Illegal unquoted character ((CTRL-CHAR, code 10)): has to be escaped using backslash to be included 相关的知识,希望对你有一定的参考价值。

报错堆栈:

Illegal unquoted character ((CTRL-CHAR, code 10)): has to be escaped using backslash to be included in string value\\n at [Source: (org.apache.cxf.transport.http.AbstractHTTPDestination$1); line: 3, column: 34

报错原因:

字符串中包含换行 \'\\n\'

解决办法:

1.在\'\\n\'之前加转义符号\'\\\';

2.ObjectMapper MAPPER = new ObjectMapper();给MAPPER设置一个属性 MAPPER.configure(com.fasterxml.jackson.core.JsonParser.Feature.ALLOW_UNQUOTED_CONTROL_CHARS, true);

以上是关于Illegal unquoted character ((CTRL-CHAR, code 10)): has to be escaped using backslash to be included 的主要内容,如果未能解决你的问题,请参考以下文章

python+pandas+openpyxl下载xls illegalCharacterError

Illegal characters in path

openpyxl 中的所有 ILLEGAL_CHARACTERS 是啥?

java:[1,0] illegal character: 65279 问题

error error: illegal character: 'u3000'

【已解决】Illegal character ((CTRL-CHAR, code 31)) 排查解决