我的 json 值来自 java,如
var obj = "[{"id":"58","str":"sd <p/> Comment By Smith John on 2012-10-30"},{"id":"58","str":"sd <p/> Comment By Smith John on 2012-10-30"},{"id":"58","str":"sd <p/> Comment By Smith John on 2012-10-30"},{"id":"58","str":"sd <p/> Comment By Smith John on 2012-10-30"},{"id":"58","str":"sd <p/> Comment By Smith John on 2012-10-30"},{"id":"58","str":"sd <p/> Comment By Smith John on 2012-10-30"},{"id":"58","str":"sd <p/> Comment By Smith John on 2012-10-30"},{"id":"58","str":"sd <p/> Comment By Smith John on 2012-10-30"}] ".
我想使用 jquery 解析为 $.parseJSON(obj);
我收到未定义的错误。我想获取 id 值。
我包括了 jquery-ui.js 和 jquery.js。
我签入了 jsonlint 并将其作为有效的 json。