使用jQuery.getJSON()解析有值JSON时出现语法错误

使用jQuery.getJSON()解析有值JSON时出现语法错误,jquery,ajax,json,Jquery,Ajax,Json,我已经编写了一个小的web servlet,它返回 结果是一个有效的JSON对象: wget -qO- "http://cinema-sderot.appspot.com/getSchedule" | python -mjson.tool 下一步是使用AJAX从网页中提取JSON。我已经: $(文档).ready(函数(){ $(“按钮”)。单击(函数(){ $.getJSON(“http://cinema-sderot.appspot.com/getSchedule,函数(结果){ $(“

我已经编写了一个小的web servlet,它返回

结果是一个有效的JSON对象:

wget -qO- "http://cinema-sderot.appspot.com/getSchedule" | python -mjson.tool
下一步是使用AJAX从网页中提取JSON。我已经:


$(文档).ready(函数(){
$(“按钮”)。单击(函数(){
$.getJSON(“http://cinema-sderot.appspot.com/getSchedule,函数(结果){
$(“div”)。追加(结果);
});
});
});
获取JSON数据
按下按钮时,此代码应将JSON的内容放入div中。它在Chrome和Firefox中都失败,原因是:

SyntaxError:JSON解析:数据意外结束


这很奇怪,因为JSON经过测试是有效的。知道怎么回事吗?

JSLint在JSON有效时调用false<代码>在
“title”中出现意外的“
”:“Young\u0026 Beautiful”——第1779行更有意义。你是如何得到这个消息的?将上面站点的响应粘贴到JSLint中,点击JSLint按钮并检查底部的错误。谢谢,我不知道JSLint。
\u0026
是问题所在吗?如果是这样,我如何在客户端修复它?JSON是使用Gson创建的。这可能与
<!DOCTYPE html>
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js">
</script>
<script>
$(document).ready(function(){
  $("button").click(function(){
    $.getJSON("http://cinema-sderot.appspot.com/getSchedule",function(result){
        $("div").append(result);
    });
  });
});
</script>
</head>
<body>

<button>Get JSON data</button>
<div></div>

</body>
</html>