On 25/02/13 17:41, Joshua TAYLOR wrote:
On Mon, Feb 25, 2013 at 10:28 AM, Andy Seaborne <[email protected]> wrote:
2/ The RDF/JSON writer (Jena 2.10.0 and 2.7.*) is accessed via
RDFJSONWriter.write(....)

(this will change quite soon to include model.write(...,"RDF/JSON") but it
is not in 2.10.0)

Rob Vesse responded (on another thread, where'd I'd asked about
*reading*) with a third option, that's relevant if the OP wants to be
able to use model.write in 2.10.0 :

On Mon, Feb 25, 2013 at 12:17 PM, Rob Vesse <[email protected]> wrote:
| You should be able to wire up RDF/JSON so it can be used by Model.read()
| and Model.write() by calling the following:
|
| IO_Jena.wireIntoJena();
|
| If you call RIOT.init() anywhere in your code (or call ARQ.init() which
| will call RIOT.init()) then this will already be called for you.
|
| Then you should be able to do model.read(in, null, "RDF/JSON");


model.write( , "RDF/JSON")

only works for me, not for you yet :-)

The new code is in:

https://svn.apache.org/repos/asf/jena/Experimental/riot-output/

This is now ready to integrate into Jena and adds writing RDF/JSON from model.write.

It has a configuration writer registry if you want to add your own writers or adapters anything else.

The Turtle pretty writer has been rewrittern (my, was the old code old!)

There are integrated TriG and NQuads writers.

And variants trading off prettiness with streaming.

https://svn.apache.org/repos/asf/jena/Experimental/riot-output/riot-output-doc.mdtest

        Andy

Reply via email to