почему parseJSON возвращает null

У меня следующий код jQuery / JS

<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 (data) показывает данные JSON в консоли firebug (надстройка firefox ), но console.log ($ .parseJSON (data)) показывает null .

в чем может быть причина.

Мне нужно преобразовать строку JSON в массив.

8
задан I-M-JM 24 June 2011 в 08:49
поделиться