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

Popular posts from this blog

java - How to set log4j.defaultInitOverride property to false in jboss server 6 -

c - GStreamer 1.0 1.4.5 RTSP Example Server sends 503 Service unavailable -

Using ajax with sonata admin list view pagination -