我正在尝试在www.jsonlint.com上验证以下JSON:http://s2g.supsi.ch/hcd/test.json
如果我复制并粘贴jsonlint中的文本,就会验证JSON。但是,如果我输入jsonlint的JSON URL (http://s2g.supsi.ch/hcd/test.json),我会收到以下错误:
Parse error on line 1:
^
Expecting '{', '['我不明白为什么它不能工作。可能是文本编码?
发布于 2015-07-17 02:41:09
下面是读取URL的代码:
if (jsonVal.substring(0, 4).toLowerCase() === "http")
{
$.post("proxy.php", {"url": jsonVal}, function (responseObj)
{
$('#json_input').val(responseObj.content);
validate();
}, 'json');以下是问题所在:
https://stackoverflow.com/questions/28427115
复制相似问题