Re: [Pharo-dev] NeoJSON Mapping name-changing field

2014-09-02 Thread Sven Van Caekenberghe
Sean, On 01 Sep 2014, at 03:29, Sean P. DeNigris s...@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

[Pharo-dev] NeoJSON Mapping name-changing field

2014-08-31 Thread Sean P. DeNigris
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 - Cheers, Sean -- View this message in context:

Re: [Pharo-dev] NeoJSON Mapping name-changing field

2014-08-31 Thread Sean P. DeNigris
Sean P. DeNigris wrote How do I handle mapping this second field with NeoJSONReader? Thanks I ended up with FlickApiResponse classneoJsonMapping: mapper mapper for: self customDo: [ :mapping | mapping decoder: [ :dict | self new

Re: [Pharo-dev] NeoJSON Mapping name-changing field

2014-08-31 Thread Sean P. DeNigris
Sean P. DeNigris wrote I ended up with FlickApiResponse classneoJsonMapping: mapper... It turns out the Flickr API returns slightly weird JSON responses - the status is on the same level as possible multiple data attributes, so I ended up with (even uglier): neoJsonMapping: mapper