Re: JSON-LD from Turtle/N-Triples in JS

Hello Adrian,

On 01/18/2014 06:42 PM, Adrian Gschwend wrote:
> Googling didn't help so I ask here: I can parse Turtle/N-Triples with
> Rubens N3.js or some other libraries like rdfstore (which use N3 again).
> Now the question is how do I serialize JSON-LD out of it, anyone knows
> of a direct way? If not, what's the easiest JSON-LD structure I would
> have to generate to get there?

I have some code to do the conversion from Ruben's n3.js triples to the 
format jsonld.js expects, it also tries to preserve prefixes.

It's not used in production anywhere, so it is not well tested.

https://github.com/warpr/turtle-to-jsonld

Regards,

Kuno Woudt

Received on Saturday, 18 January 2014 19:30:34 UTC