Re: Node.js tool for RDFa -> JSON-LD transformation

Hm. Forgive me to be out of touch, but I do not know what nodejs and npm are...

Is it possible to install/compile this directly on my Mac?


On Mar 30, 2013, at 02:34 , Manu Sporny <> wrote:

> bcc: RDFa WG, RDF WG
> Dave Lehn and Dave Longley just put together a tool that's pretty rough
> around the edges, but really helpful for those trying to:
> * Transform RDFa to JSON-LD
> * Normalize JSON-LD/RDF Datasets to NQuads
> * Transform JSON-LD to compact, expanded, normalized, or flattened form
> To install the tool, do the following (you will need git, nodejs, and
> npm installed):
> git clone
> cd jsonld.js
> npm install
> To compact a document on the Web using a JSON-LD context published on
> the Web:
> ./bin/jsonld compact
>  -c ""
>  ""
> That will read in a PaySwarm Asset and Listing in RDFa 1.0 format (using
> Green Turtle by Alex Milowski), convert it to JSON-LD expanded form,
> compact it using the '' context, and dump it
> out to the console in compacted form.
> ./bin/jsonld normalize -q ""
> That will read in a PaySwarm Asset and Listing in RDFa 1.0 format,
> normalize the data using the RDF Dataset normalization algorithm, and
> then dump the output to normalized NQuads format. The NQuads can then be
> processed via SHA-256, or similar algorithm, to get a deterministic hash
> of the contents of the Dataset.
> The implementation is up-to-date with the RDFa and JSON-LD specs. The
> tool still needs quite a bit of tweaking, but it's a pretty powerful
> demonstration of many of the things this community has been building
> over the past several years.
> -- manu
> -- 
> Manu Sporny (skype: msporny, twitter: manusporny, G+: +Manu Sporny)
> Founder/CEO - Digital Bazaar, Inc.
> blog: Google Summer of Code 2013: RDFa, JSON-LD, Web Payments

Ivan Herman, W3C Semantic Web Activity Lead
mobile: +31-641044153

Received on Saturday, 30 March 2013 09:55:58 UTC