nodeSolidServer / nodeSolidServer/node-solid-server
Blank nodes cause 500 response ("Error translating between RDF formats") when requesting JSON-LD
還沒有人認領這個 Issue。
- 主要語言
- JavaScript
- 星號
- 1.8k
- 分支
- 308
- PR 合併指標
- 30 天內沒有已合併 PR
描述
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
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
研究方向
使用 Accept:application/ld+json 分別對 with-bnode.ttl 和 without_bnode.ttl 重現這兩個請求,並比較回應。從失敗的請求開始,追蹤伺服器將 RDF 轉換為 JSON-LD 的路徑。完成的標準是:包含空白節點的文件回傳有效的 JSON-LD,其中空白節點表示為不帶 @id 的物件,而不是回傳 500 回應。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- javascript
- 領域
- api, backend
- Issue 類型
- 缺陷
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 42/100