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
- Host: GitHub
- URL: https://github.com/rybesh/jsonldtransform
- Owner: rybesh
- Created: 2013-06-28T20:26:09.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2013-07-15T17:19:13.000Z (almost 13 years ago)
- Last Synced: 2025-02-14T14:51:31.283Z (over 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 141 KB
- Stars: 4
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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)