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

Wrong media type used for JSON(-LD) #91

Closed
BigBlueHat opened this issue Apr 20, 2017 · 10 comments
Closed

Wrong media type used for JSON(-LD) #91

BigBlueHat opened this issue Apr 20, 2017 · 10 comments
Assignees

Comments

@BigBlueHat
Copy link

The docs (and the responses themselves) use application/rdf+json for returning @graph-based JSON-LD documents. However, the correct media type is applicatoin/ld+json for that format.

For example:

curl https://id.nlm.nih.gov/mesh/D015242.json-ld

returns this content type:

Content-Type: application/rdf+json;charset=utf-8

As does the .json variant.

The application/rdf+json media type is used for a very different (and deprecated) JSON-based RDF format (known as "RDF 1.1 JSON Alternate Serialization (RDF/JSON)"):
https://www.w3.org/TR/rdf-json/#sec-examples

JSON-LD replaced that format:

...unless you have a specific reason to use the syntax defined in this document instead of JSON-LD, you are encouraged to use JSON-LD.

Please consider returning the correct application/ld+json media type for the .json-ld, .json, and content-negotiated (Accept: application/ld+json) requests (which, btw, currently returns n-triples).

Thanks for considering this!
🎩

@danizen
Copy link
Contributor

danizen commented Apr 20, 2017

I'll take a look. If this is a problem, I've contributed back the badness to lodestar upstream at EBI as well.

@BigBlueHat
Copy link
Author

Let me know if you need any testing help. I'm mostly working with https://github.com/digitalbazaar/jsonld.js and https://github.com/RubenVerborgh/N3.js for dealing with stuff in the browser and node (fwiw).

Appreciate the help/time!

@danizen
Copy link
Contributor

danizen commented Apr 20, 2017

@BigBlueHat, I've issued a pull request to EBISPOT/lodestar. I'll include the fix in our downstream builds if it is accepted.

@danizen
Copy link
Contributor

danizen commented May 24, 2017

@BigBlueHat, this has been merged upstream, and we will install it during our next release. This is tentatively scheduled for the end of June.

@danizen
Copy link
Contributor

danizen commented May 24, 2017

Note - this will also affect auto conversion. That is, now if you send Accept: application/rdf+json, you will get JSON-LD. Once the change occurs, that will be Accept: application/ld+json. I will look into accepting both.

@danizen danizen self-assigned this May 24, 2017
@danizen
Copy link
Contributor

danizen commented Oct 5, 2017

@BigBlueHat , please test - this should be done in production now. It was accepted upstream awhile ago, but I'm not in control of when it shows up at EBISPOT.

@danizen
Copy link
Contributor

danizen commented Jan 22, 2019

@BigBlueHat , I need to close this - we are moving away from Github Issues, and will be redirecting to our support site for support.

@danizen danizen closed this as completed Jan 22, 2019
@BigBlueHat
Copy link
Author

Sad things are moving away from GitHub. 😢 What will happen to the open source code? Is it also getting a new home (hopefully not behind closed doors)?

Thanks for letting me know regardless!

@danizen
Copy link
Contributor

danizen commented Jan 22, 2019

@BigBlueHat, no we are preserving the use of github, we are just moving the issues. We are preserving the open source code.

@BigBlueHat
Copy link
Author

Phew! Thanks @danizen 😄

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