[英]parsing the JSON response throws error
Parse error on line 4:
.../2012", "Data": "JVBERi0xLjMNCg0KMjA
----------------------^
Expecting 'STRING', 'NUMBER', 'NULL', 'TRUE', 'FALSE', '{', '['
I get a very huge response which i cannot paste here from my service, i get this error in jsonlinit . 我收到一个非常巨大的响应,无法从服务中粘贴到这里,我在jsonlinit中收到此错误。 How to handle such responses in javascript bypassing.
如何在javascript绕过中处理此类响应。
Added Sample Response 添加了样本响应
{
"CreateByFullName": "asas",
"CreateDateTime": "11\/05\/2012",
"Data": "JVBERi0xLjMNCg0KMjAxIDAgb2JqDQo8PA0KL0UgMzQ1MDQNCi9IIFsg==",
"DocumentId":1540,"DocumentIdSpecified":false,"DocumentTypeName":"big sq bmp","FileType":"PDF","LastModifiedDateTime":"07\/14\/2004","LastModifiedFullName":""}
As has been remarked you full sample is valid JSON. 如前所述,完整的示例是有效的JSON。
I can provoke the error you see by inserting a newline into the Data
string. 通过在
Data
字符串中插入换行符,可以引起您看到的错误。 It appears to be base-64 data, are you sure there are no embedded newlines? 它似乎是基于64位的数据,您确定没有嵌入的换行符吗?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.