jquery - Get json object without JSON.parse? -
jquery - Get json object without JSON.parse? -
i found this:
use python output:
print ‘content-type: text/x-json\n\n’ print json.dumps([{'title':arr['title']}])
and json string jquery:
$ajax( success: function(msg){ if(msg[0].title) alert(msg[0].title); } )
it works, can tell me why is? thanks~
jquery calls json.parse internally on modern browsers have if content-type json
homecoming window.json && window.json.parse ? window.json.parse( info ) : (new function("return " + data))();
json jquery
Comments
Post a Comment