Closed. This question is
off-topic。它当前不接受答案。
想改善这个问题吗?
Update the question,所以它是
on-topic,用于堆栈溢出。
6个月前关闭。
我正在从第三方获得此回复。如何在Java中转换为正确的JSON?如果我通过
https://codebeautify.org/jsonvalidator网站美化JSON,则会得到正确的输出。
以下是我试图由Json Reader缩进的输出,但解析错误。
{
FUNCTION_NAME: "READWORKINFO",
USER_NAME: "LAPSMQClient1",
OPERATION: "MATCH",
HASMOREPARAM: "|12|2|2019001000826|",
REC_MAX_COUNT: 1,
REC_OBT_COUNT: 1,
FAILEDPATTERN: "",
OPTION: "HAS MORE",
SECTION: [{
NAME: "WORKINFO",
RECORD: [{
FIELD: {
AppData1: "2019001000826",
AppData2: "STAGE=INITIATED;SourceSystem=MobileApp;",
Data: "{\"LoanDetails\":{\"LeadNumber\":\"2019001000826\",\"ProductCode\":\"PL\",\"BranchCode\":\"8\",\"LoanStatus\":\"CREATE\",\"ProposalNumber\":\"\",\"ApprovalDate\":\"\",\"DisbursalDate\":\"\",\"SourceSystemName\":\"PersonalLoanAPP\",\"Customers\":[{\"Name\":\"SANGEETHA KARANTH\",\"CustomerId\":\"114019131\",\"Relation\":\"APPLICANT\",\"UCICCode\":\"A100\",\"MobileNumber\":\"7406565548\"}]},\"Kind\":\"LOAN_WI\",\"Rescan\":{},\"History\":{},\"ImageInfo\":{},\"RequestData\":[{\"REQUESTID\":\"PL-1561973295441\",\"SOURCE\":\"MQPUBLISH_TEST\",\"STAGE\":\"MQPUBLISH\",\"TIME\":\"01 07 2019 03 18 28\",\"USERID\":\"TEST\"},{\"REQUESTID\":\"PL-1561973366388\",\"SOURCE\":\"MQPUBLISH_TEST\",\"STAGE\":\"MQPUBLISH\",\"TIME\":\"01 07 2019 03 19 38\",\"USERID\":\"TEST\"},{\"REQUESTID\":\"PL-1561973553462\",\"SOURCE\":\"MQPUBLISH_TEST\",\"STAGE\":\"MQPUBLISH\",\"TIME\":\"01 07 2019 03 22 47\",\"USERID\":\"TEST\"},{\"REQUESTID\":\"PL-1561973554160\",\"SOURCE\":\"MQPUBLISH_TEST\",\"STAGE\":\"MQPUBLISH\",\"TIME\":\"01 07 2019 03 22 47\",\"USERID\":\"TEST\"},{\"REQUESTID\":\"PL-1561973976217\",\"SOURCE\":\"MQPUBLISH_TEST\",\"STAGE\":\"MQPUBLISH\",\"TIME\":\"01 07 2019 03 29 48\",\"USERID\":\"TEST\"},{\"REQUESTID\":\"PL-1561975084510\",\"SOURCE\":\"MQPUBLISH_TEST\",\"STAGE\":\"MQPUBLISH\",\"TIME\":\"01 07 2019 03 48 18\",\"USERID\":\"TEST\"}],\"CaseMemo\":[],\"PublishedDocuments\":[{\"DocId\":34,\"DocCode\":\"CSR\",\"Name\":\"PL USER ExperianReport\",\"File\":\"ExperianReport_20190010008261561973295441.json\",\"Instance\":1,\"URL\":\"/poolone/case/2019001000826/sec/1/in/1/doc/34/rev/00/type/json\",\"MimeType\":\"application/json\",\"CroppedDocuments\":[]},{\"DocId\":34,\"DocCode\":\"CSR\",\"Name\":\"PL CIBIL\",\"File\":\"CIBILREPORT_20190010008261561973366388.xml\",\"Instance\":2,\"URL\":\"/poolone/case/2019001000826/sec/1/in/2/doc/34/rev/00/type/xml\",\"MimeType\":\"text/xml\",\"CroppedDocuments\":[]},{\"DocId\":10,\"DocCode\":\"ADD\",\"Name\":\"PL USER PERMANENTADD\",\"File\":\"PERMANENTADD_20190010008261561973553462.jpeg\",\"Instance\":1,\"URL\":\"/poolone/case/2019001000826/sec/2/in/1/doc/10/rev/00/type/jpeg\",\"MimeType\":\"image/jpeg\",\"CroppedDocuments\":[]},{\"DocId\":10,\"DocCode\":\"ADD\",\"Name\":\"PL USER CURRENTADD\",\"File\":\"CURRENTADD_20190010008261561973554160.jpeg\",\"Instance\":2,\"URL\":\"/poolone/case/2019001000826/sec/2/in/2/doc/10/rev/00/type/jpeg\",\"MimeType\":\"image/jpeg\",\"CroppedDocuments\":[]},{\"DocId\":34,\"DocCode\":\"CSR\",\"Name\":\"PL CIBIL\",\"File\":\"CIBILREPORT_20190010008261561973976217.xml\",\"Instance\":3,\"URL\":\"/poolone/case/2019001000826/sec/1/in/3/doc/34/rev/00/type/xml\",\"MimeType\":\"text/xml\",\"CroppedDocuments\":[]},{\"DocId\":34,\"DocCode\":\"CSR\",\"Name\":\"PL CIBIL\",\"File\":\"CIBILREPORT_20190010008261561975084510.xml\",\"Instance\":4,\"URL\":\"/poolone/case/2019001000826/sec/1/in/4/doc/34/rev/00/type/xml\",\"MimeType\":\"text/xml\",\"Tab\":0}],\"Documents\":[]}"
}
}]
}]
}
预期产量:
{
"FUNCTION_NAME": "READWORKINFO",
"USER_NAME": "LAPSMQClient1",
"OPERATION": "MATCH",
"HASMOREPARAM": "|12|2|2019001000826|",
"REC_MAX_COUNT": 1,
"REC_OBT_COUNT": 1,
"FAILEDPATTERN": "",
"OPTION": "HAS MORE",
"SECTION": [
{
"NAME": "WORKINFO",
"RECORD": [
{
"FIELD": {
"AppData1": "2019001000826",
"AppData2": "STAGE=INITIATED;SourceSystem=MobileApp;",
"Data": "{\"LoanDetails\":{\"LeadNumber\":\"2019001000826\",\"ProductCode\":\"PL\",\"BranchCode\":\"8\",\"LoanStatus\":\"CREATE\",\"ProposalNumber\":\"\",\"ApprovalDate\":\"\",\"DisbursalDate\":\"\",\"SourceSystemName\":\"PersonalLoanAPP\",\"Customers\":[{\"Name\":\"SANGEETHA KARANTH\",\"CustomerId\":\"114019131\",\"Relation\":\"APPLICANT\",\"UCICCode\":\"A100\",\"MobileNumber\":\"7406565548\"}]},\"Kind\":\"LOAN_WI\",\"Rescan\":{},\"History\":{},\"ImageInfo\":{},\"RequestData\":[{\"REQUESTID\":\"PL-1561973295441\",\"SOURCE\":\"MQPUBLISH_TEST\",\"STAGE\":\"MQPUBLISH\",\"TIME\":\"01 07 2019 03 18 28\",\"USERID\":\"TEST\"},{\"REQUESTID\":\"PL-1561973366388\",\"SOURCE\":\"MQPUBLISH_TEST\",\"STAGE\":\"MQPUBLISH\",\"TIME\":\"01 07 2019 03 19 38\",\"USERID\":\"TEST\"},{\"REQUESTID\":\"PL-1561973553462\",\"SOURCE\":\"MQPUBLISH_TEST\",\"STAGE\":\"MQPUBLISH\",\"TIME\":\"01 07 2019 03 22 47\",\"USERID\":\"TEST\"},{\"REQUESTID\":\"PL-1561973554160\",\"SOURCE\":\"MQPUBLISH_TEST\",\"STAGE\":\"MQPUBLISH\",\"TIME\":\"01 07 2019 03 22 47\",\"USERID\":\"TEST\"},{\"REQUESTID\":\"PL-1561973976217\",\"SOURCE\":\"MQPUBLISH_TEST\",\"STAGE\":\"MQPUBLISH\",\"TIME\":\"01 07 2019 03 29 48\",\"USERID\":\"TEST\"},{\"REQUESTID\":\"PL-1561975084510\",\"SOURCE\":\"MQPUBLISH_TEST\",\"STAGE\":\"MQPUBLISH\",\"TIME\":\"01 07 2019 03 48 18\",\"USERID\":\"TEST\"}],\"CaseMemo\":[],\"PublishedDocuments\":[{\"DocId\":34,\"DocCode\":\"CSR\",\"Name\":\"PL USER ExperianReport\",\"File\":\"ExperianReport_20190010008261561973295441.json\",\"Instance\":1,\"URL\":\"/poolone/case/2019001000826/sec/1/in/1/doc/34/rev/00/type/json\",\"MimeType\":\"application/json\",\"CroppedDocuments\":[]},{\"DocId\":34,\"DocCode\":\"CSR\",\"Name\":\"PL CIBIL\",\"File\":\"CIBILREPORT_20190010008261561973366388.xml\",\"Instance\":2,\"URL\":\"/poolone/case/2019001000826/sec/1/in/2/doc/34/rev/00/type/xml\",\"MimeType\":\"text/xml\",\"CroppedDocuments\":[]},{\"DocId\":10,\"DocCode\":\"ADD\",\"Name\":\"PL USER PERMANENTADD\",\"File\":\"PERMANENTADD_20190010008261561973553462.jpeg\",\"Instance\":1,\"URL\":\"/poolone/case/2019001000826/sec/2/in/1/doc/10/rev/00/type/jpeg\",\"MimeType\":\"image/jpeg\",\"CroppedDocuments\":[]},{\"DocId\":10,\"DocCode\":\"ADD\",\"Name\":\"PL USER CURRENTADD\",\"File\":\"CURRENTADD_20190010008261561973554160.jpeg\",\"Instance\":2,\"URL\":\"/poolone/case/2019001000826/sec/2/in/2/doc/10/rev/00/type/jpeg\",\"MimeType\":\"image/jpeg\",\"CroppedDocuments\":[]},{\"DocId\":34,\"DocCode\":\"CSR\",\"Name\":\"PL CIBIL\",\"File\":\"CIBILREPORT_20190010008261561973976217.xml\",\"Instance\":3,\"URL\":\"/poolone/case/2019001000826/sec/1/in/3/doc/34/rev/00/type/xml\",\"MimeType\":\"text/xml\",\"CroppedDocuments\":[]},{\"DocId\":34,\"DocCode\":\"CSR\",\"Name\":\"PL CIBIL\",\"File\":\"CIBILREPORT_20190010008261561975084510.xml\",\"Instance\":4,\"URL\":\"/poolone/case/2019001000826/sec/1/in/4/doc/34/rev/00/type/xml\",\"MimeType\":\"text/xml\",\"Tab\":0}],\"Documents\":[]}"
}
}
]
}
]
}
我是一名优秀的程序员,十分优秀!