README
Simple JSON to N3 converter
A simple conversion script that takes a folder of files that contain JSON as input, and produces a single N3 file as output.
Requirements
Requires Node.js v10.16.0 or later.
Usage
- Create new
json-to-n3.config.js
next to a folder with data that needs to be processed - Edit
json-to-n3.config.js
and specify:
sourcePath
- path to the folder with input filesresultPath
- path to the resulting N3 fileformat
- format to be used for serialization (defaults to N-Triples)prefixes
- object of prefixes to be usedprocessItem()
- processing function that takes JSON structure and writes it as quads
- Execute the script by running
npx simple-json-to-n3
in the folder with config
See example folder for an example config that processes slice of an OAG dataset.
Caveats
The script assumes input files have one JSON object per string.
Originally made for parsing Open Academic Graph.