An open API service indexing awesome lists of open source software.

https://github.com/rybesh/jsonldtransform

A streaming JSON-LD parser for Node.js
https://github.com/rybesh/jsonldtransform

Last synced: about 1 year ago
JSON representation

A streaming JSON-LD parser for Node.js

Awesome Lists containing this project

README

          

## jsonldtransform

A streaming [JSON-LD](http://json-ld.org/) parser for Node.js, implemented as a [Transform](http://nodejs.org/api/stream.html#stream_class_stream_transform) stream.

## example

```JavaScript
var JSONLDTransform = require('jsonldtransform').JSONLDTransform
, fs = require('fs')
, transform = new JSONLDTransform()

transform.on('context', function(o, scope){
console.log('context', o, scope)
})
transform.on('graph', function(o){
console.log('graph', o)
})

fs.createReadStream('test/data/dpla_items.json')
.pipe(this.transform)
.pipe(process.stdout)
```

## why?

To make it easier to work with large and complex JSON-LD documents.

## install

```Shell
npm install jsonldtransform
```

## test

```Shell
npm test jsonldtransform
```

## license

[MIT](http://opensource.org/licenses/MIT)