Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use application/ld+json as Content-Type for the Omeka S API #2107

Open
coret opened this issue Oct 27, 2023 · 1 comment
Open

Use application/ld+json as Content-Type for the Omeka S API #2107

coret opened this issue Oct 27, 2023 · 1 comment

Comments

@coret
Copy link

coret commented Oct 27, 2023

Currently the Content-Type of the of the API response is application/json; charset=utf-8 (like https://www.goudatijdmachine.nl/omeka/api/items/37476 and also the context https://www.goudatijdmachine.nl/omeka/api-context).

image

The Omeka S API outputs a more specific kind of JSON: JSON-LD. So the content-type of these responses from the Omeka S API should reflect this and use the Content-Type application/ld+json; charset=utf-8 (see also https://www.w3.org/TR/json-ld11/).

I stumbled on this issue while using the (standards adhering) tool https://sketch.zazuko.com/ - I pasted the output of the Omeka S API into this tool and it showed the (correct) error:

Error: 
Failed to load remote context https://www.goudatijdmachine.nl/omeka/api-context: 
Unsupported JSON-LD media type application/json
@jimsafley
Copy link
Member

The API will return an application/ld+json content type in an upcoming release. In fact, consumers will be able to request other formats, such as RDF XML, N3, Turtle, and N-Triples, each with their corresponding content type.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants