意外元素:CDATA在验证响应

问题描述:

请找我下面的JSON响应意外元素:CDATA在验证响应

{"birthday": "1991-09-09","familyName": "abcdefgh", "profiles": [], "title": "Mr","id": 123456,"middleName": null,"emailVerified": "2016-01-27 15:45:03 +0000", "primaryAddress": {"company": null, "address2": null,"stateAbbreviation": null,"zipPlus4": null,"city": null,"address1": null,"phone": null, "zip": null,"mobile": null,"country": null},"gender": null,"lastUpdated": "2016-02-22 05:31:30.678332 +0000","assignedRoles":[{"relatedManagedObject": "/abcdefgh/abcdefgh/123456789","roleType": "EndUser","createdDateTime": "2014-03-07 15:43:00 +0000","managedObject": "/abcdefgh/subscribers/44123456789","id": 11010,"label": "44123456789","endDate": null},{"roleType": "LegalOwner","createdDateTime": "2016-03-07 15:43:00 +0000","managedObject": "/abcdefgh/abcdefgh/123456789","id": 11010,"label": "123456789","endDate": null}],"password": null,"photos": [],"email": "abcd.in","givenName": "abcd","currentLocation": null,"deactivateAccount": null,"lastLogin": null,"created": "2016-02-24 19:18:54.415972 +0000","displayName": null,"uuid": "fgisdufuidsfgrughkurhgkufhghfughdfklh","aboutMe": null,"display": null,"statuses": []} 

每当我试图在SOAP验证我得到验证错误为意想不到的元素:CDATA

可否请你指导这

你的json格式是错误的..如果你粘贴你的回复jsonlint.com,你会看到..

例如,

birthday: 1991 - 09 - 09, 
familyName: abcdefg 

应该是:

"birthday": "1991-09-09", 
"familyName": "abcdefg" 

注意引号。所以重新格式化你的JSON,看看会发生什么

+0

嗨 请找到更新的代码, 我的坏,我没有没有正确地上传它在堆栈上。 感谢您指出,但我仍然面临同样的问题 – wilfredclement7

+0

您更新的json是有效的..所以问题不在于这个字符串。你能发表其他相关的代码吗? –

+0

这是我的唯一回应。 – wilfredclement7