JSON到JSON-LD [英] JSON to JSON-LD
问题描述
我想将JSON文件转换为JSON-LD.
I want to convert JSON file into JSON-LD.
任何人都可以告诉我,应该执行哪些步骤/步骤?
Can anyone tell me, what are the procedures/steps should be done to do that?
或
有没有完成转换的工具?
Is there any tools for doing that conversion done?
谢谢
推荐答案
In most cases, the only thing you need to do is to create a JSON-LD context and add it to your JSON documents. You can either embed it directly or put it in a different file and simply reference it. Depending on the structure of your JSON documents and the vocabulary you are using, you might need to change the JSON slightly. Typicall this involves adding identifiers in the form of URLs to your JSON objects (@id
) and restructuring it to match the way the vocabulary is modelled.
如果您正在寻找工具,我建议您看看 https://github.com/antoniogarrote/json-ld-macros
If you are looking for tools, I'd suggest to have a look at https://github.com/antoniogarrote/json-ld-macros
希望这会有所帮助.正如其他人已经指出的那样,您提供的信息越多,您得到的答案就越好.
Hope this helps. As others already pointed out, the more information you provide, the better answers you'll get.
这篇关于JSON到JSON-LD的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!