how to get the value of json data using python -


This is my code:

  a = '' '{"title": " SSIS "," body " "Data": {"status": 0, "user name": "www", "userId": "433"}} '' 'a = eval (a) print a.title   

But this error shows:

what can I do,

thanks

to you eval :

  & gt; & Gt; & Gt; Instead of using a JSON parser like the  simplejson  module should be used. A = '' '{"Title": "SSS", "Body": "wwwwï¼aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' = '# onclic =' Logout () '> ;; & gt;; & gt; "," Data ": {" status ": 0," user name ":" www "," userId ":" 433 "}} '' 'gt; & Gt; & Gt; Import Customization & gt; & Gt; & Gt; Parsed_data = simplejson.loads (A)> & gt; & Gt; & Gt; Parsed_data ['title'] 'sss'    

Comments