我有以下的jQuery/JS代码为什么parseJSON返回null
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>
<script>
$.getJSON("http://example/topics", {}, function(data){
console.log(data); // display the JSON *data* in the web console
console.log($.parseJSON(data));
});
</script>
的console.log(数据)显示Firebug的控制台内JSON数据(Firefox插件),但的console.log($。 parseJSON(data))显示null。
可能是什么原因。
我需要将JSON字符串转换为数组。