Hi Joshua

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");

Rob



On 2/25/13 9:00 AM, "Joshua TAYLOR" <joshuaaa...@gmail.com> wrote:

>On Mon, Feb 25, 2013 at 10:28 AM, Andy Seaborne <a...@apache.org> wrote:
>> 1/ Jena 2.6.4 is quite old and IIRC has no RDF/JSON support, read or
>>write.
>>
>> 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)
>
>In another thread I mentioned that there were some things that I won't
>be able to test for a while yet (need to be able to build first, :) ),
>and RDFJSON serialization is one of them.  I had already found
>RDFJSONWriter.write (which cleans up a number of things;  thanks!).
>I'd hoped for reading,
>
>    model.read( InputStream in, String base, String lang )
>
>would work as
>
>    model.read( in, null, "RDF/JSON" )
>
>but hearing that write.( ..., "RDF/JSON" ) isn't there yet, I'll ask,
>how should RDFJSON be *read* into a model?
>
>//JT
>
>
>-- 
>Joshua Taylor, http://www.cs.rpi.edu/~tayloj/

Reply via email to