Hello, I try to make a app which displays images from a external api . I was hoping I could do it with only 1 json parsing but to get the right size of images I need more then 1 Right now I have two classes with fromJson methods Painting class >> fromJSON: json | instance | instance := self new. instance title: (json at: #title); painter: (json at: #principalOrFirstMaker); imageUrl: ((json at: #webImage) at: #url). ^ instance Paintings class > fromJSON: json fromJSON: json | instance artObjects | instance := self new. artObjects := json at: #artObjects. artObjects do: [ :eachArtObject | instance addPainting: (Painting fromJSON: eachArtObject) ]. ^ instance but to get it working right , I have to do it like this : Painting class >> fromJSON: json | instance | instance := self new. instance title: (json at: #objectNumber); ^ instance but the problem is now I need a second call to this url :
and then need a new imageUrl out of it.
and then have one object with objectNumber and the new url
Also I have to make a call to this url :
|
- [Pharo-users] complex json parsing. Roelof Wobben
- Re: [Pharo-users] complex json parsing. Ben Coman
- Re: [Pharo-users] complex json parsing. Roelof Wobben
- Re: [Pharo-users] complex json parsing. Roelof Wobben
- Re: [Pharo-users] complex json parsing. Ben Coman
- Re: [Pharo-users] complex json parsing... Roelof Wobben
- Re: [Pharo-users] complex json par... Ben Coman
- Re: [Pharo-users] complex json... Roelof Wobben
- Re: [Pharo-users] complex json... Ben Coman
- Re: [Pharo-users] complex json... Roelof Wobben
- Re: [Pharo-users] complex json... Ben Coman