org.codehaus.jackson.JsonParseException:意外的字符(' x'(代码120)):期待逗号分隔OBJECT条目

时间:2014-08-22 12:15:08

标签: json

*我试图打印下面的字符串,我从文件中取出。

{"error_msg":null,"channel":0x0,"api_version":"3.4","request_type":"authorize_capture","server_mode":"TEST","auth_result":{"response_code":0x6,"MOP":"VISA","source":"NUL","source_response_code":" ","terminal_number":"12345","transaction_number":0x38224,"auth_code":"06","avs_response":" ","fraud_response":"0","security_code_response":" "}}

我使用下面的代码做一个漂亮的打印

Object json = mapper.readValue(line, Object.class);
String ss = mapper.writerWithDefaultPrettyPrinter().writeValueAsString(json);

我收到以下错误。请帮我解决这个问题

Exception in thread "main" org.codehaus.jackson.JsonParseException: Unexpected character ('x' (code 120)): was expecting comma to separate OBJECT entries

0 个答案:

没有答案