JSON to JSON-LD

本秂侑毒 提交于 2019-12-30 10:53:16

问题


I want to convert JSON file into JSON-LD.

Can anyone tell me, what are the procedures/steps should be done to do that?

or

Is there any tools for doing that conversion done?

Thanks


回答1:


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.

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.



来源:https://stackoverflow.com/questions/27564369/json-to-json-ld

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!