[Pharo-users] what did I do wrong here

Sven Van Caekenberghe sven at stfx.eu
Mon Feb 25 16:05:19 EST 2019


Your #fromJSON: methods should be on the class not the instance side.

> On 25 Feb 2019, at 21:52, Roelof Wobben <r.wobben at home.nl> wrote:
> 
> Hello, 
> 
> I try to ask a api for some data and then display the data  I want. 
> 
> But when I do : 
> 
> json := (NeoJSONReader fromString: (ZnEasy get: 'https://www.rijksmuseum.nl/api/nl/collection?key=14OGzuak&format=json&type=schilderij&toppieces=True
> ') contents).
> 
> Paintings new fromJSON:  json 
> 
> 
> I still see a message that Paintings do not understand new.
> 
> What did I do wrong here.
> 
> I will include  a file-out of my code 
> 
> 
> Regards, 
> 
> Roelof
> 
> <Paintings.st>




More information about the Pharo-users mailing list