Re: how to compare two json file line by line using python?

2013-05-28 Thread Grant Edwards
On 2013-05-27, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: On Sun, 26 May 2013 21:32:40 -0700, Avnesh Shakya wrote: But I want to compare line by line and value by value. but i found that json data is unordered data, so how can i compare them without sorting it. please give me

Re: how to compare two json file line by line using python?

2013-05-27 Thread Avnesh Shakya
Thanks a lot, I got it. On Mon, May 27, 2013 at 11:03 AM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: On Sun, 26 May 2013 21:32:40 -0700, Avnesh Shakya wrote: But I want to compare line by line and value by value. but i found that json data is unordered data, so how can i

Re: how to compare two json file line by line using python?

2013-05-27 Thread Denis McMahon
On Sun, 26 May 2013 21:32:40 -0700, Avnesh Shakya wrote: how to compare two json file line by line using python? Actually I am doing it in this way.. Oh what a lot of homework you have today. Did you ever stop to think what the easiest way to compare two json datasets is? -- Denis

how to compare two json file line by line using python?

2013-05-26 Thread Avnesh Shakya
hi, how to compare two json file line by line using python? Actually I am doing it in this way.. import simplejson as json def compare(): newJsonFile= open('newData.json') lastJsonFile= open('version1.json') newLines = newJsonFile.readlines() print newLines sortedNew

Re: how to compare two json file line by line using python?

2013-05-26 Thread rusi
On May 27, 9:32 am, Avnesh Shakya avnesh.n...@gmail.com wrote: hi,    how to compare two json file line by line using python? Actually I am doing it in this way.. import simplejson as json def compare():     newJsonFile= open('newData.json')     lastJsonFile= open('version1.json

Re: how to compare two json file line by line using python?

2013-05-26 Thread Avnesh Shakya
be not so I think sorting is required, but if i compare line by line that will be good, I am thinking in this way... On Mon, May 27, 2013 at 10:21 AM, rusi rustompm...@gmail.com wrote: On May 27, 9:32 am, Avnesh Shakya avnesh.n...@gmail.com wrote: hi, how to compare two json file line

Re: how to compare two json file line by line using python?

2013-05-26 Thread Steven D'Aprano
On Sun, 26 May 2013 21:32:40 -0700, Avnesh Shakya wrote: But I want to compare line by line and value by value. but i found that json data is unordered data, so how can i compare them without sorting it. please give me some idea about it. I am new for it. I want to check every value line by