Hello,
I have ask this before on the discord channels but I cannot find
there the solutions anymore.
I try to make a website that displays the paintings of the
Rijksmuseaum in Amsterdam.
That provides a json response
So I do :
| json paintingCollection |
json := (NeoJSONReader fromString: (ZnEasy get:
'
https://www.rijksmuseum.nl/api/nl/collection?key=14OGzuak&format=json&type=schilderij&toppieces=True')
contents) at: #artObjects.
so I still have this json :
{
"links": {
"self": "https://www.rijksmuseum.nl/api/nl/collection/SK-C-5",
"web": "https://www.rijksmuseum.nl/nl/collection/SK-C-5"
},
"id": "nl-SK-C-5",
"objectNumber": "SK-C-5",
"title": "Schutters van wijk II onder leiding van kapitein Frans Banninck Cocq, bekend als de ‘Nachtwacht’",
"hasImage": true,
"principalOrFirstMaker": "Rembrandt Harmensz. van Rijn",
"longTitle": "Schutters van wijk II onder leiding van kapitein Frans Banninck Cocq, bekend als de ‘Nachtwacht’, Rembrandt Harmensz. van Rijn, 1642",
"showImage": true,
"permitDownload": true,
"webImage": {
"guid": "92253da1-794d-49f4-9e3c-e4c160715f53",
"offsetPercentageX": 50,
"offsetPercentageY": 100,
"width": 2500,
"height": 2034,
"url": "http://lh6.ggpht.com/wwx2vAS9DzFmmyeZefPjMtmCNOdjD80gvkXJcylloy40SiZOhdLHVddEZLBHtymHu53TcvqJLYZfZF7M-uvoMmG_wSI=s0"
},
"headerImage": {
"guid": "29a2a516-f1d2-4713-9cbd-7a4458026057",
"offsetPercentageX": 50,
"offsetPercentageY": 50,
"width": 1920,
"height": 460,
"url": "http://lh5.ggpht.com/SgH3Qo-vYI8GGm7-b-Qt6lXgsCAIoU2VDRwO5LYSBVNhhbZCetcvc88ZPi518MTy0MHDrna4X4ZC1ymxVJVpzps8gqw=s0"
},
"productionPlaces": []
},
but then as a object
now I wonder how I can change the code with I think a object named Painting thatI onky want to use these
fields : objectNumber,
principalOrFirstMaker and webImage/url
so that I have a collection of paintings with only these things
Roelof
-