I need to make a call to a service that expects json-ld, and I only have json. What is the process in order to convert json to json-ld. Given that I have the context the service uses, say www.example.com/test/core.json-ld and www.example.com/test2/core.json-ld,
is there some library magic that will just accept json and context as a parameter and spit out json-ld?
From what I have been reading, it seems very possible to convert json > json-ld, I am still new to this and can't seem to find an easy solution. It sounds like all the json needs is a context, but I am still unsure of how to do this.
I want something like
{
"id": 1,
"name": "A green door",
"price": 12.50,
}
to be
{
@context{
test : www.example.com/test/core.json-ld
test2 : www.example.com/test2/core.json-ld
}
"id": 1,
"test:name": "A green door",
"test2:price": 12.50,
}