在处理fasterxml中string字符串转对象json格式,标准的json都是双引号 (” “);由于数据是单引号(‘ ‘)格式。导致了如下报错,特此记录
com.fasterxml.jackson.core.JsonParseException: Unexpected character (‘s’ (code 115)): was expecting double-quote to start field name
1 | com.fasterxml.jackson.databind.ObjectMapper |
除了ALLOW_UNQUOTED_FIELD_NAMES,ALLOW_SINGLE_QUOTES还有其它的设置,有用到试试。