ruby-rdf / json-ld

Ruby JSON-LD reader/writer for RDF.rb
The Unlicense
232 stars 27 forks source link

Example of converting JSON-LD to N-Triples? #23

Closed artob closed 8 years ago

artob commented 8 years ago

It wasn't clear how to use the --format command-line option. I would have expected one of the following formulations to work, but they both resulted in an unhelpful stack trace:

jsonld --format=nt example.jsonld
jsonld --format=application/n-triples example.jsonld

However, I eventually figured out that the following formulation does indeed work:

jsonld --format=ntriples example.jsonld

Perhaps the --help text for --format might be enhanced to mention (e.g., "ntriples") or the like?

gkellogg commented 8 years ago

It could work with --format nt if we made :nt a symbol for RDF::NTriples::Format. Same with :nq.

Otherwise, the --help would probably need to enumerate all format symbols loaded to give an acceptable set. This also relates to the rdf command.

gkellogg commented 8 years ago

This is handled through the rdf executable now.