2016-11-14 36 views
-2

I am getting below exception while parsing string to object. can anyone suggest me ,why i am getting this error ?傑克遜JsonParseException:預期有效值

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

FYI : I have already tried with given below option.but it's not helped.

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

Refer given below 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 
} 

感謝。

+0

你可以張貼的JSON,從錯誤時冥冥中似乎你還沒有加入正確的數據。請先驗證您的JSON。 –

+0

請編輯您的問題。目前它缺少格式化和代碼。 – Seth

+2

我猜你的json內容不正確 –

回答

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)",