Sean P. DeNigris wrote
> I ended up with FlickApiResponse class>>neoJsonMapping: 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
        mapper for: self customDo: [ :mapping |
                mapping decoder: [ :dict | | dataDict |
                        dataDict := Dictionary new.
                        (dict keys reject: [ :k | k = 'stat']) do: [ :k | 
dataDict at: k put:
(dict at: k) ].
                        self new
                                status: (dict at: 'stat');
                                data: dataDict;
                                yourself ] ]



-----
Cheers,
Sean
--
View this message in context: 
http://forum.world.st/NeoJSON-Mapping-name-changing-field-tp4775545p4775552.html
Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.

Reply via email to