On Feb 10, 5:23 pm, Rein Petersen wrote:
> obj = simplejson.loads("{'id':'KS1-0','type':'activity','units':
> 1,'priceper':450}")
The string of JSON is wrapped with double quote. ( http://json.org/ )
This will work
obj = simplejson.loads('{"id":"KS1-0","type":"activity","units":
1,"pricep
Hey thanks for the reply - that was the problem. Thanks again :)
On Feb 10, 4:41 am, livibetter wrote:
> On Feb 10, 5:23 pm, Rein Petersen wrote:
>
> > obj = simplejson.loads("{'id':'KS1-0','type':'activity','units':
> > 1,'priceper':450}")
>
> The string of JSON is wrapped with double quot
I use this
a=eval("{'id':'KS1-0','type':'activity','units':1,'priceper':450}")
print a['type']
On Feb 10, 5:23 pm, Rein Petersen wrote:
> what is wrong with this:
>
> from django.utils import simplejson
> ...
> obj = simplejson.loads("{'id':'KS1-0','type':'activity','units':
> 1,'priceper':4