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