Re: python simplejson decoding

2011-03-04 Thread Arthur Mc Coy
Good day people, So I have python file which can handle json data to put and get back it from a file say objects.json. Great. Now I want to run this code from within C++ application. I used swig to wrap the C++ class, which wants to call python code. It works fine, because when I import native p

Re: python simplejson decoding

2011-03-02 Thread Arthur Mc Coy
Hi Peter, I implemented my decoder using your approach. Very positive. But that is for simple objects. My objects have nested lists. For example MyObject has property (member) called benchmarks, which is the list of defined benchmarks. I'm not sure if obj.__dict__.update will help me to copy nes

Re: python simplejson decoding

2011-03-02 Thread Felipe Vinturini
Hi Arthur, Maybe this link helps you: http://www.doughellmann.com/PyMOTW/json/ I used it to learn JSON. =o) Regards, Felipe. On Wed, Mar 2, 2011 at 11:24 AM, Peter Otten <__pete...@web.de> wrote: > Arthur Mc Coy wrote: > > > Hi all, > > > > > > > > I'm

Re: python simplejson decoding

2011-03-02 Thread Peter Otten
Arthur Mc Coy wrote: > Hi all, > > > > I'm trying an example (in attached file, I mean the bottom of this > message). > > First, I create a list of 3 objects. Then I do: > > > PutJSONObjects(objects) > objects = GetJSONObjects() > PutJSONObjects(objects, "objects2.json") > > > 1) PutJSONOb

python simplejson decoding

2011-03-02 Thread Arthur Mc Coy
Hi all, I'm trying an example (in attached file, I mean the bottom of this message). First, I create a list of 3 objects. Then I do: PutJSONObjects(objects) objects = GetJSONObjects() PutJSONObjects(objects, "objects2.json") 1) PutJSONObjects(objects) method creates objects.json file (by de