This PR adds the functionality to format query results to the official W3C JSON format. The new function JSONFormat can be piped to an existing pipeline of bindings and used as follows
import { JSONFormat } from 'sparql-engine'
// configure your datasets, graphs and the plan builder as usual
let pipeline = builder.execute(/* some SPARQL query */)
// plug-in the json formatter
pipeline = pipeline.pipe(JSONFormat)
// output results
pipeline.subscribe(console.log, console.error, () => console.log('done'))
This PR adds the functionality to format query results to the official W3C JSON format. The new function
JSONFormat
can be piped to an existing pipeline of bindings and used as follows