Sean, On 01 Sep 2014, at 03:29, Sean P. DeNigris <sean@clipperadams.com> wrote:
The Flickr API returns a JSON object with two fields: 'status' and otherField, where the name of otherField depends on the API method. How do I handle mapping this second field with NeoJSONReader? Thanks
If you want all responses to have the same class, then this does indeed mean that you have to handle a dynamic response, which is hard(er). But you say that the structure of the response depends on the API call, that means that you could create a (sub)class per response, no ? I have to admit that I most often just parse into general maps/lists (Dictionary/Array) and deal with those. Creating specific classes just to hold data is so Java style ;-) but it does add more implicit documentation. Sven
----- Cheers, Sean -- View this message in context: http://forum.world.st/NeoJSON-Mapping-name-changing-field-tp4775545.html Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.