Re: A library that converts regular JSON to JSON-LD

On 4/11/20 11:54 AM, Melvin Carvalho wrote:
> Is there are library that converts simple json (think just a flat object 
> of key value pairs)
> 
> Into JSON-LD -- any value form will do, if some hacking of the context 
> is needed, that would be fine
> 
> If no library, is there an algorithm?
> 
> And if no algorithm, could we make one?

I have not seen one yet, but it's good idea.  In particular, the 
algorithm needs to recursively traverse the JSON tree and keep track of 
nesting to generate an @context that will keep nested properties of the 
same name distinct.  See the discussion here:
https://github.com/w3c/EasierRDF/issues/29

Once such an algorithm is defined, it could become a standard way to map 
plain JSON to RDF.

David Booth

Received on Saturday, 11 April 2020 19:22:42 UTC