As Larry has just pointed out, DB2 10.5 has JSON support. As well as the developerWorks articles see the DB2 Knowledge Center at:
http://www-01.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.swg.im.dbclient.json.doc/doc/c0061252.html?lang=en
However, if you want to be able to render any result set as a single JSON document or even as a collection of similar JSON documents then I suspect you are out of luck. I haven't tried it out, but I think the JSON support only extends to working on a schema designed to hold JSON objects. It does not appear as deeply integrated into the DB2 engine as SQL and XML.
Would it not be fairly trivial to write a Java routine yourself, to execute any query and return the result set as a JSON document?
Jeremy Rickard