question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

RDF convertors should not read or write plain JSON

See original GitHub issue

As discovered by @joepio in https://github.com/CommunitySolidServer/CommunitySolidServer/issues/275

Terminal 1

git checkout 3c32466d8873e73328f678acce1260fea02cabc9 # latest main
npm ci
npm start

Terminal 2

echo '{}' | curl -T - -H "Content-Type: application/json" http://localhost:3000/test
curl -H "Accept: text/turtle" http://localhost:3000/test

Log

2022-03-28T20:27:59.225Z [BaseHttpServerFactory] info: Received GET request for /test
2022-03-28T20:27:59.241Z [WebAclReader] info: Reading ACL statements from http://localhost:3000/.acl
2022-03-28T20:27:59.249Z [StreamUtil] warn: Piped stream errored with Missing context link header for media type application/json on http://localhost:3000/test
2022-03-28T20:27:59.250Z [StreamUtil] warn: Piped stream errored with Missing context link header for media type application/json on http://localhost:3000/test
2022-03-28T20:27:59.252Z [StreamUtil] warn: Piped stream errored with Missing context link header for media type application/json on http://localhost:3000/test
2022-03-28T20:27:59.252Z [BasicResponseWriter] error: Writing to HttpResponse failed with message Missing context link header for media type application/json on http://localhost:3000/test
2022-03-28T20:28:00.255Z [GuardedStream] error: No error listener was attached but error was thrown: aborted

Expected

200 or 406

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
joachimvhcommented, Mar 29, 2022

That is going to require a MetadataParser that instead of putting header data into metadata throws an error if it sees a context header (specifically with application/json content type perhaps).

0reactions
joachimvhcommented, Jun 30, 2022

Done in #1359

Read more comments on GitHub >

github_iconTop Results From Across the Web

Documentation - RDF/JSON Specification - EasyRdf
JSON (the serialisation of data in JavaScript Object Notation) is an increasingly popular data format, largely because it is easy to parse (or, ......
Read more >
Online RDF converter and validator to JSON-LD, Microdata ...
Online RDF converter to JSON-LD, Microdata, TriG or RDF-star serialization formats, such as RDF/XML, Turtle, N3, N-Triples, Google and Schema.org rich ...
Read more >
ConverterToRdf - W3C Wiki
A Converter to RDF is a tool which converts application data from an application-specific format into RDF for use with RDF tools and...
Read more >
A RESTful Multi-Format Data Converter for the Semantic Web
Pygments supports all required syntaxes, i.e. RDFa and Microdata using the HTML formatter; RDF/XML taking advantage of the XML formatter; RDF/JSON and JSON-LD ......
Read more >
Exploring JSON-LD as an Executable Definition of FHIR RDF ...
It does not allow a JSON property to generate more than one RDF triple. ... As of this writing, these converters have been...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found