This example uses Postman:
•Postman is used to query REST endpoints.
•Custom jsonld-compact.js script to process JSON-LD responses. The script is available here.
Note: |
•jq is used to make JSON responses more readable.
These scripts are not needed when using Postman, but can be useful when running Curl.
As we will work with JSON-LD documents, we should not rely on any specific JSON structure returned from endpoints.
We should always compact a returned JSON-LD document to the form we understand. To do this we should prepare our own JSON-LD context:
echo '{ "sc": "https://schema.org/", "spc": "https://schema.parkeon.com/", "ssp": "https://{domain}/{platform}/" }' > context.json |
This context will make all URLs beginning with given hosts shorter, so nicer to work with.