Jackson JsonParseException:期望有效值

时间:2016-11-14 11:39:41

标签: java json spring jackson

  

我在解析字符串到对象时遇到异常。能够   有人建议我,为什么我得到这个错误?

 org.codehaus.jackson.JsonParseException: Unexpected character ('A' (code 65)): expected a valid value (number, String, array, object, 'true', 'false' or 'null')
     at [Source: java.io.StringReader@3f203f2; line: 1, column: 2]
  

仅供参考:我已经尝试过以下选项。但事实并非如此   帮助

_jsonMapper.configure(JsonParser.Feature.ALLOW_UNQUOTED_FIELD_NAMES,true);
  

请参阅以下JSONContent:

   {
    "date": 1468834383007,
    "seq": 2,
    "type": "CPT",
    "code": "31237",
    "bit": "Not Applicable",
    "desc": "Hello/world ; with chorme,\n\t\t\t\t\t\t\t\t\thelicopeer or one (two theree)",
    "qun": 2,
    "ty": "VS",
    "dstat": 1463682600000,
    "dend": 1463682600000,
    "prmInd": true,
    "deletable": false,
    "mar": false,
    "show": true,
    "uid": "10ab5ad8-a472-4be6-9e9d-a7c9589bb201",
    "compprcstr": "31237CPTNot hello/world,surgical;withbiopsy,one(two)2",
    "short": "NA",
    "tastsr": "CPT",
    "bui": false,
    "desFee": "Java\/oralceendo,\n\t\t\t\t\t\t\t\t\orlaceor two (f)",
    "pce": "31237",
    "desTrun": "Hello/java ,\n\t\t\t\t\t\t\t\t\Orlace or Java (three)",
    "sasStr": "Visit(s)",
    "codE": false,
    "fsDate": "05/20/2016",
    "feDate": "05/20/2016",
    "primary": false,
    "servTy": "VS",
    "doS": true,
    "proead": false,
    "ambulance": false,
    "lilatehell": "NA",
    "modifList": ["NA"],
    "prwithSeq": "31237CPT2",
    "dirty": true,
    "dirtySince": false,
    "entityName": "com.neopo.corba.model.hospital.Check",
    "skip1": false
}

感谢。

1 个答案:

答案 0 :(得分:0)

中的

json格式不正确

  

\ t \ O

变化

"desTrun": "Hello/java ,\n\t\t\t\t\t\t\t\t\Orlace or Java (three)",

 "desTrun": "Hello/java ,\n\t\t\t\t\t\t\t\t Orlace or Java (three)",