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
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