On 11/04/13 11:35, Jie wrote:> Hello,
I need to get the query result in the format of JSON and I have find
the two class dealing with this in jena, which are
JSONOutputResultSet and ResultSetFormatter. I wonder which is the
difference between using this two, and if anyone have got some sample
code for this? Thank you very much.
Best Regards, Jie
Use ResultSetFormatter - it's the public interface. Package
com.hp.hpl.jena.query
JSONOutputResultSet is the implementation that does the work -
ResultSetFormatter calls it.
If you follow the code:
ResultSetFormatter.outputAsJSON
-->
new JSONOutput
-->
new JSONOutputResultSet
Andy