nodeSolidServer / nodeSolidServer/node-solid-server

Blank nodes cause 500 response ("Error translating between RDF formats") when requesting JSON-LD

Aperta
#1,420 4 commenti 1 reazione 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Lingua principale
JavaScript
Stelle
1.8k
Fork
308
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

Issue: When attempting to request a JSON-LD serialisation (via "Accept:application/ld+json" header) of a turtle document which includes one or more blank nodes, a 500 error is generated. An equivalent document where the blank node is replaced with a URI-identified node returns JSON-LD just fine.

Solid Version: Running on Solid 5.2.4 (current version on https://solid.community)

Expected outcome: Valid JSON-LD should be returned whether or not blank nodes are included (serialising any blank nodes as JSON objects without "@id", according to the JSON-LD spec).

Steps to reproduce

# 1: document without bnode, requested as turtle
$ http get https://musicog.solid.community/public/without_bnode.ttl
HTTP/1.1 200 OK
Content-Type: text/turtle
# ...
<http://example.com/testSubject1> <http://example.com/testPredicate><http://example.com/testSubject2> .
<http://example.com/testSubject2> <http://example.com/testPredicate2> "Example" .

# 2: document without bnode, requested as JSON-LD
$ http get https://musicog.solid.community/public/without_bnode.ttl Accept:application/ld+json
HTTP/1.1 200 OK
Content-Type: application/ld+json; charset=utf-8
# ...
[
    {
        "@id": "http://example.com/testSubject1",
        "http://example.com/testPredicate": [
            {
                "@id": "http://example.com/testSubject2"
            }
        ]
    },
    {
        "@id": "http://example.com/testSubject2",
        "http://example.com/testPredicate2": [
            {
                "@value": "Example"
            }
        ]
    }
]


# 3: document with bnode, requested as turtle
$ http get https://musicog.solid.community/public/with-bnode.ttl
HTTP/1.1 200 OK
Content-Type: text/turtle
# ...
<http://example.com/testSubject> <http://example.com/testPredicate> [ <http://example.com/testPredicate2> "Example" ] . 

# 4: document with bnode, requested as JSON-LD -> 500 error!
$ http get https://musicog.solid.community/public/with-bnode.ttl Accept:application/ld+json
HTTP/1.1 500 Internal Server Error
Content-Type: text/plain; charset=utf-8
# ... 
Error translating between RDF formats

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Riproduci le due richieste verso with-bnode.ttl e without_bnode.ttl usando Accept:application/ld+json e confronta le risposte. Traccia il percorso di traduzione da RDF a JSON-LD del server a partire dalla richiesta che fallisce. Il lavoro è completato quando il documento con blank node restituisce JSON-LD valido, con i blank node rappresentati come oggetti senza @id, invece di una risposta 500.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
javascript
Ambito
api, backend
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
42/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.