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

On Sat, 11 Apr 2020 at 19:34, Adrian Gschwend <ml-ktk@netlabs.org> wrote:

> On 11.04.20 17:54, Melvin Carvalho wrote:
>
> Hi Melvin,
>
> > 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
>
> Not sure if I miss something here but pretty much any JSON-LD parser
> will do that for you if you provide JSON + context.
>
> I've converted many JSON files to RDF that way, using JavaScript based
> parsers in my case.
>

Thanks Adrian

But what if it is regular old json that doesnt have a context?

Could I add for example:

"@context": {
      "@version": 1.1,
      "@base": "http://example/document",
      "@vocab": ""
    },


>
> regards
>
> Adrian
>
>

Received on Saturday, 11 April 2020 18:00:13 UTC