please help me how to check the validity of the json object

if suppose the example of the JSON is as

({type:'AAU', msgid:1265033798233, sel:0, gadinfo:[{
adid:316,adprt:40.0,dur:10,ef:'2009/06/03 10:00:00',et:'2012/06/03 12:00:00',imgfurl:'vaccumcleaner_h.jpg'

SO I want a script in python which would give me the validity of the object as the output by taking the json object as the input.

I tried json module in python but I could'nt fetch the required result..

Thanks in advance.

Edited by vamsicoolman: n/a

7 Years
Discussion Span
Last Post by vegaseat

Json in a format used for communication purpose i.e to transfer data.
It is lightweight data format.

In python there is json module but there I am not able to know abt the exact method to the check the validation..

Edited by vamsicoolman: n/a


Thanks for the info! It appears that module json is new since Python version 2.6. I will have to explore it with Python 3.1.1, to see if I can figure out a way to validate. Also noticed that FireFox is using the .json format for backup bookmarks.

You may want to take a look at tool.py in library directory json

Edited by vegaseat: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.