W3C home > Mailing lists > Public > public-json-ld-wg@w3.org > January 2022


From: Pierre-Antoine Champin <pierre-antoine@w3.org>
Date: Wed, 19 Jan 2022 16:39:19 +0100
Message-ID: <cbfb2493-dd59-d01b-2ab3-815b318cb01d@w3.org>
To: Joshua Tomlin <jtomlin@omnifederal.com>, public-json-ld-wg@w3.org
Dear Joshua,

short anwer: to convert JSON to JSON-LD, you really don't need any 
library, because the vast majority of JSON documents are valid JSON-LD 
documents. Now, in order to be /useful/ JSON-LD, they usually need an 
appropriate `@context`, but you don't need any library either to add 
that key to your JSON document.

The real question is: what do you need to put in your context in order 
to make the JSON-LD useful. And that really depends on what you want to 
do with it (and why you need it specifically to be JSON-LD).


PS: as for converting other formats to JSON-LD, the easiest path I 
believe is to first convert them to JSON. And that's independant from 
the -LD part.

On 18/01/2022 22:58, Joshua Tomlin wrote:
> Dear w3,
>     Are there libraries out there that can transform data into 
> JSON-LD? I'm currently working with React and we're lost when 
> attempting to generate data(ex. XML, Lists, JSON) into JSON-LD form. 
> Please let me know if you need any additional information from me.
> Thanks,
> Joshua Tomlin
Received on Wednesday, 19 January 2022 15:39:24 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 19 January 2022 15:39:25 UTC