-
-
Notifications
You must be signed in to change notification settings - Fork 33
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
HttpLoader: Suppress HTTP Content-Type validation #132
Comments
JSON-LD 1.1 specification is quite strict on how to deal with content type that does not represent the content.
FYI: Jena does not support JSON-LD 1.1 but 1.0 You can download the content on your side or you can implement an interceptor replacing wrong content type header. |
The spec. is indeed clear, but a Feature can be an extension to the spec. , as Playground does ( silently , which is not good ). |
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days |
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days |
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days |
Since e.g. HttpLoader lodaer = new HttpLoader(DefaultHttpClient.defaultInstance());
loader.setFallbackContentType(MediaType.JSON);
...
options.setDocumentLoader(loader); |
Feature request is related to a problem
I'm frustrated when a JSON-LD source has a linked
@context
whose MIME type is not one of the JSON expected types.In this case it is a raw github URL, that says
test/plain
.This, or a file, is very convenient to develop and debug a new
@context
.Moreover, being explicitly loaded as a
@context
, is is supposed to beapplication/ld+json
.I deserves a warning for sure, but not a blocking exception.
Other JSON-LD engines
JENA (with jsonld-java) processes such JSON-LD source well :
$JENA/bin/riot --output=turtle --syntax=jsonld https://geb.ffspeleo.fr/api/api/v2/
The Playground also accepts such input:
The text was updated successfully, but these errors were encountered: