Re: Verify JSON Data

2014-05-26 Thread Rustom Mody
On Tuesday, May 27, 2014 12:05:58 AM UTC+5:30, Grant Edwards wrote: > On 2014-05-26, gaurang shah wrote: > > Would someone let me know how to verify JSON data in python. > Parse the file into a data structure with whatever parser you like, > then write a program to go thorugh the data structure a

Re: Verify JSON Data

2014-05-26 Thread Grant Edwards
On 2014-05-26, gaurangns...@gmail.com wrote: > Would someone let me know how to verify JSON data in python. Parse the file into a data structure with whatever parser you like, then write a program to go thorugh the data structure and verify it. > There are so many modules available to verify XM

Re: Verify JSON Data

2014-05-26 Thread Gene Heskett
On Monday 26 May 2014 11:58:06 Chris Angelico did opine And Gene did reply: > On Tue, May 27, 2014 at 1:37 AM, Gene Heskett wrote: > > Just for S&G, and without checking the version numbers of anything, > > this may not be all that bulletproof a test: > > > > gene@coyote:~$ echo '[1, 2, 3]' | js

Re: Verify JSON Data

2014-05-26 Thread Gene Heskett
On Monday 26 May 2014 11:55:29 Roy Smith did opine And Gene did reply: > In article , > > Gene Heskett wrote: > > > $ echo '[1, 2, 3]' | json_xs -t null 2>/dev/null; echo $? > > > > 0 > > > > > $ echo '[1; 2, 3]' | json_xs -t null 2>/dev/null; echo $? > > > > 255 > > > > > > gene@coyote:~$

Re: Verify JSON Data

2014-05-26 Thread Chris Angelico
On Tue, May 27, 2014 at 1:19 AM, Roy Smith wrote: > Python comes with a built-in json module. Just use json.load() or > json.loads() to parse your JSON data. The first call reads from a > string, the second on from a file, but in all other ways, they're > identical. Minor nit-pick: they're the

Re: Verify JSON Data

2014-05-26 Thread Chris Angelico
On Tue, May 27, 2014 at 1:55 AM, Roy Smith wrote: > In article , > Gene Heskett wrote: > >> > $ echo '[1, 2, 3]' | json_xs -t null 2>/dev/null; echo $? >> 0 > >> > $ echo '[1; 2, 3]' | json_xs -t null 2>/dev/null; echo $? >> 255 > > >> gene@coyote:~$ echo '[1, 2, 3]' | json_xs -t null 2>/dev/nul

Re: Verify JSON Data

2014-05-26 Thread Roy Smith
In article , Gene Heskett wrote: > > $ echo '[1, 2, 3]' | json_xs -t null 2>/dev/null; echo $? > 0 > > $ echo '[1; 2, 3]' | json_xs -t null 2>/dev/null; echo $? > 255 > gene@coyote:~$ echo '[1, 2, 3]' | json_xs -t null 2>/dev/null; echo $? > 127 > gene@coyote:~$ echo '[1; 2, 3]' | json_xs -t

Re: Verify JSON Data

2014-05-26 Thread Chris Angelico
On Tue, May 27, 2014 at 1:37 AM, Gene Heskett wrote: > Just for S&G, and without checking the version numbers of anything, this > may not be all that bulletproof a test: > > gene@coyote:~$ echo '[1, 2, 3]' | json_xs -t null 2>/dev/null; echo $? > 127 > gene@coyote:~$ echo '[1; 2, 3]' | json_xs -t

Re: Verify JSON Data

2014-05-26 Thread Denis McMahon
On Mon, 26 May 2014 07:26:20 -0700, gaurangnshah wrote: > Is there any module through which i can verify JSON file like DOM or > Object oriented way. ( i.e. data.key) Where is the json data coming from? What do you mean by verify? https://docs.python.org/2/library/json.html#encoders-and-decoders

Re: Verify JSON Data

2014-05-26 Thread Gene Heskett
On Monday 26 May 2014 11:19:53 Roy Smith did opine And Gene did reply: > In article , > > gaurangns...@gmail.com wrote: > > Hi Guys, > > > > Would someone let me know how to verify JSON data in python. There > > are so many modules available to verify XML file, however i didn't > > find any good

Re: Verify JSON Data

2014-05-26 Thread Burak Arslan
On 26/05/14 16:26, gaurangns...@gmail.com wrote: Hi Guys, Would someone let me know how to verify JSON data in python. There are so many modules available to verify XML file, however i didn't find any good module to verify JSON Data. Hi, Spyne re-implements (a useful subset of) Xml Schema

Re: Verify JSON Data

2014-05-26 Thread Roy Smith
In article , gaurangns...@gmail.com wrote: > Hi Guys, > > Would someone let me know how to verify JSON data in python. There are so > many modules available to verify XML file, however i didn't find any good > module to verify JSON Data. Python comes with a built-in json module. Just use j