Comment 5 for bug 481090

Revision history for this message
Robert Collins (lifeless) wrote :

21:28 < lifeless> leonardr: you were going to describe how to approach supporting a dict of objects as a return value
21:28 < leonardr> right
21:28 < leonardr> 1. create @returns_dict_of similar to @returns_collection_of
21:29 < leonardr> 2. come up with a wadl description of what @returns_dict_of means and put it in the wadl
21:29 < lifeless> whats the difference between a dict and a collection ?
21:29 < leonardr> a collection is a list
21:29 < lifeless> ok
21:29 < lifeless> if we're using non python names, should we say 'returns_map_of' ? :P
21:29 < leonardr> 3. have lazr.restful properly serialize a dict to json (this might work already)
21:30 < leonardr> 'collection' is a term from the atom publishing protocol. there's no corresponding term for 'map' so i don't think it matters much
21:31 < leonardr> 4. have lazr.restfulclient pick up on @returns_dict_of and handle it properly. old versions won't be able to handle the return value so we should probably do this in a new version of the web service