You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何让JSON-LD中table:columns的description解析为mkdocs:description?

JSON-LD表格数据解析问题

我在JSON-LD playground中测试了一份描述表格数据的文档,原文档内容如下:

{
  "@context": {
    "mkdocs": "https://mkdocs.iolanta.tech/",
    "table": "https://mkdocs.iolanta.tech/tables/",

    "description": "mkdocs:description",

    "table:rows": {
      "@type": "@id"
    },
    "table:columns": {
      "@id": "table:columns",
      "@type": "@id",
      "@container": "@list"
    }
  },

  "$id": "table",
  "table:columns": [
    "description"
  ],
  "table:rows": [
    {
      "description": "foo"
    }
  ]
}

我期望术语description能解析为mkdocs:description,但展开后的结果显示并非所有场景都生效:

[
  {
    "https://mkdocs.iolanta.tech/tables/columns": [
      {
        "@list": [
          {
            "@id": "https://dvcs.w3.org/hg/json-ld/raw-file/default/playground/description"
          }
        ]
      }
    ],
    "https://mkdocs.iolanta.tech/tables/rows": [
      {
        "https://mkdocs.iolanta.tech/description": [
          {
            "@value": "foo"
          }
        ]
      }
    ]
  }
]

在table:rows块中,description作为键能正确解析为https://mkdocs.iolanta.tech/description;但在table:columns块中,description作为值却被解析为https://dvcs.w3.org/hg/json-ld/raw-file/default/playground/description。我推测这是因为两者的角色(键/值)不同。

请问是否可以构造JSON-LD描述,让table:columns中的description解析为mkdocs:description,同时让其他任意关键词(如some-random-column)基于文档的基准URL解析?


内容的提问来源于stack exchange,提问作者Anatoly Scherbakov

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.05 05:45:35