This works:

    public String print(Model model) {
        String       ret;
        OutputStream baos = new ByteArrayOutputStream();

        RDFDataMgr.write(baos, model, RDFFormat.RDFJSON) ;
//        RDFDataMgr.write(baos, model, RDFFormat.JSONLD) ;
ret = baos.toString();

return(ret);
    }


On Monday, August 22, 2016 at 5:58:03 PM UTC-7, Holger Knublauch wrote:
>
> The ModelPrinter is a singleton and anyone can install their own 
> variation. Simply create a clone of the class, make it a subclass of 
> ModelPrinter and override the createRDFWriter method. Then install it using 
> set(ModelPrinter).
>
> HTH
> Holger
>
>
> On 23/08/2016 10:20, Jack Hodges wrote:
>
> I see that the ModelPrinter in the shacl archive returns a string. Is 
> there one specific to JSON or do we have to write one ourselves? 
>
> Jack
> -- 
> You received this message because you are subscribed to the Google Group 
> "TopBraid Suite Users", the topics of which include the TopBraid Suite 
> family of products and its base technologies such as SPARQLMotion, SPARQL 
> Web Pages and SPIN.
> To post to this group, send email to topbrai...@googlegroups.com 
> <javascript:>
> --- 
> You received this message because you are subscribed to the Google Groups 
> "TopBraid Suite Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to topbraid-user...@googlegroups.com <javascript:>.
> For more options, visit https://groups.google.com/d/optout.
>
>
>

-- 
You received this message because you are subscribed to the Google Group 
"TopBraid Suite Users", the topics of which include the TopBraid Suite family 
of products and its base technologies such as SPARQLMotion, SPARQL Web Pages 
and SPIN.
To post to this group, send email to topbraid-users@googlegroups.com
--- 
You received this message because you are subscribed to the Google Groups 
"TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to topbraid-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to