nodeSolidServer / nodeSolidServer/node-solid-server

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

Abierto
#1,420 4 comentarios 1 reacción 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Lenguaje dominante
JavaScript
Estrellas
1.8k
Forks
308
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

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

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Línea de trabajo

Reproduce las dos solicitudes contra with-bnode.ttl y without_bnode.ttl usando Accept:application/ld+json, y compara las respuestas. Sigue la ruta de traducción de RDF a JSON-LD del servidor a partir de la solicitud que falla. Se considera terminado cuando el documento con nodos en blanco devuelve JSON-LD válido, con los nodos en blanco representados como objetos sin @id, en lugar de una respuesta 500.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
javascript
Área
api, backend
Tipo de issue
Error
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
42/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.