Type of external @context param when serializing RDF::Graph to JSON-LD

Hi,

I want to use ruby-rdf/json-ld to serialize RDF::Graph into JSON-LD given
an external @context. The examples at
https://github.com/ruby-rdf/json-ld/suggest using
JSON::LD::API::fromRDF(input, context). I noticed that the
input param should be an instance of RDF::Graph, however, it's not clear to
me what type should the context param be. Documentation for
JSON::LD::API::fromRDF states that the second parameter is [Hash{Symbol =>
Object}] options, not @context. How should I provide an external @context
when serializing RDF::Graph to JSON-LD? As a file path, String, Hash or as
an instance of JSON::LD:Context? How could you do the same when using
RDF::Graph#dump directly?

Best,

Jindrich

-- 
Jindrich Mynarz
http://mynarz.net/#jindrich

Received on Saturday, 17 August 2013 10:56:01 UTC