rdf2json

Reads RDF N-Triple/N-Quads that are sorted by subject and append a JSON/JSON-LD document per line in a designated output file.

Usage: rdf2json [options] --input filename.nt --output filename.json

Preliminaries

RDF N-Triples/N-Quads need to be sorted by subject, so that it is possible to output JSON/JSON-LD documents on-the-fly, without holding the entire input in memory or falling back to time consuming file-pointer seek operations.

Both RDF formats can be sorted on Mac OS X and Linux using the following shell command:

sort -k 1,1 UNSORTED.EXT > SORTED.EXT

Required options

Options

Common options

JSON output (--minimize option)

Installation

gem install rdf2json

Project home page

Information on the source tree, documentation, examples, issues and how to contribute, see

github.com/joejimbo/rdf2json

The BioRuby community is on IRC server: irc.freenode.org, channel: bioruby.

Biogems.info

This Biogem is published at (biogems.info/index.html#bio-rdf2json)

Copyright © 2014 Joachim Baran. See LICENSE.txt for further details.