Fedora Services API

Toshio Kuratomi a.badger at gmail.com
Sun Apr 27 20:12:09 UTC 2008


Jesus M. Rodriguez wrote:
> On Sat, Apr 26, 2008 at 10:38:51AM -0700, Toshio Kuratomi wrote:
> [snip]
> 
>> 2) JSON data that is deeply nested sucks because objects are turned into 
>> dictionaries so you have to write things like:
>>
>> package['listings']['F-8']['people']['toshio']['acls']['commit']['status']
>>
>> to get the status of a person's acls on a package.
> 
> When writing zmugfs I used simplejson.loads(rsp, object_hook=create_tree)
> where create_tree is an object creation method.  The other option
> is to change the depth of the object returned.
> 
This sounds interesting.  How do you tell which dictionaries can be 
turned into objects and which must remain dictionaries?  Or does your 
create_tree method have special knowledge of the data being returned?

-Toshio

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/fedora-infrastructure-list/attachments/20080427/e603d741/attachment.sig>


More information about the Fedora-infrastructure-list mailing list