Home > database >  JSON Data is Not Valid
JSON Data is Not Valid

Time:06-15

I am getting "JSON Data is Not Valid" error on this Json and i couldn't find what is wrong with it.When I put it in something like a JSON Validator it says

Error: Parse error on line 66: ... "InfoStr": "[{" BankEftCode ":" 00 ----------------------^ Expecting 'EOF', '}', ':', ',', ']', got 'undefined'

PS: I put 1234s and aaaa's on names and numbers for privacy so don't worry about them.

{"Header":{
  "CallerId":"0060030000",
  "RequestId":"10213",
  "Status":"SUCCESS",
  "ErrorCode":null,
  "ErrorMessage":null
  
},"Body":{
    "ComplaintSource":"aaa",
    "BankEftCodeIssuer":"12345",
    "BankEftCodeAcquirer":"12345",
    "EntryUserName":"aaa",
    "BankComplaintNo":"aaa",
    "ComplaintTimestamp":"1234",
    "CustomerIdType":"aaa",
    "CustomerIdValue":"1234",
    "CustomerName":"aaa",
    "CustomerLastName":"1234",
    "CustomerCompanyTitle":"",
    "IsVIP":false,
    "CustomerSegment":"aaa aaa",
    "CustomerMobilePhone":"1234",
    "CustomerIBAN":"1234567890",
    "CustomerAccountNo":"1234",
    "CustomerEmail":"",
    "ComplaintStatus":"",
    "ComplaintStatusStep":"",
    "ComplaintStatusDetail":"",
    "ComplaintCategory":"C1",
    "ComplaintMainTopic":"C1.1",
    "ComplaintSubTopic":"C1.1.3",
    "ComplaintDate":"2022-05-24T11:28:00 03:00",
    "ComplaintExplanation":"aaa",
    "ComplaintAmount":8670.0,
    "ComplaintCurrency":"TRY",
    "ReconciliationAmount":0.0,
    "ReconciliationCurrency":"TRY",
    "ComplaintCardNo":"1234",
    "ComplaintMaskedCardNo":"1224",
    "ComplaintEncryptedCardNumber":"aaaa",
    "RelatedComplaintNo":"0.0",
    "TransactionAmount":8670.0,
    "TransactionCurrency":"TRY",
    "TransactionTimestamp":"12345676",
    "TerminalId":"PT6172",
    "TerminalLocation":"aaa",
    "TransactionDate":"2022-05-23T11:44:00 03:00",
    "TransactionRRNNo":"",
    "TransactionAuthorizationNo":"",
    "TransactionSTANNo":"",
    "TransactionTAMRefNo":"aaaaa",
    "TransactionCardNo":"12345",
    "TransactionMaskedCardNo":"123456789",
    "TransactionCardBrand":"M",
    "TransactionCardType":"D",
    "TransactionHashCardNo":"wertyuıop",
    "TransactionTCKN":"123456789",
    "TransactionYKN":"",
    "TransactionMobilePhoneNumber":"123456789",
    "Comment":"",
    "PaymentAgent":"",
    "PaymentAgentNo":"",
    "PaymentSubscriptionNo":"",
    "InfoStr":"[{"BankEftCode":"1234567890","TaskId":"12345","RequestUser":"aaa aaa","ResponseUser":"aaa01","RequestTimestamp":"1234567890","ResponseTimestamp":"134567","RequestComment":"aaaa","ResponseComment":"aaa",
    "InfoElements":[{"Key":"AtmCashDifferenceCurrency","Value":null,"Type":null},
                    {"Key":"AtmCashSurplus","Value":"0","Type":null}
                  ]
  
                  }]",
    "F_TicketProcessType":"",
    "NF_TicketProcessType":"",
    "AtmResolveCode":"",
    "SLADueDatetime":"2022-05-27T09:49:35.966",
    "BankSLADueDatetime":"2022-05-25T12:36:22",
    "IsInfoRequested":false,
    "IssuerSLASatisfied":true,
    "AcquirerSLASatisfied":false,
    "ComplaintHashCardNo":null,
    "ComplaintCardBrand":null,
    "ComplaintCardType":null}}

Thanks for helping.

CodePudding user response:

you InfoStr value is a string, not object , so it is not valid , should be

"InfoStr": "[{\"BankEftCode\":\"1234567890\",\"TaskId\":\"12345\",\"RequestUser\":\"aaa aaa\",\"ResponseUser\":\"aaa01\",\"RequestTimestamp\":\"1234567890\",\"ResponseTimestamp\":\"134567\",\"RequestComment\":\"aaaa\",\"ResponseComment\":\"aaa\",\"InfoElements\":[{\"Key\":\"AtmCashDifferenceCurrency\",\"Value\":null,\"Type\":null},{\"Key\":\"AtmCashSurplus\",\"Value\":\"0\",\"Type\":null}]}]",
  •  Tags:  
  • json
  • Related