Converting Resultset into JSON

LabKey Support Forum
Converting Resultset into JSON jeckels  2014-11-14 09:48
Status: Closed
 
Hi Bront,

We typically use org.labkey.api.action.ApiQueryResponse, or its more extensive subclass ExtendedApiQueryResponse, to return ResultSets to a client via JSON. It writes out both the metadata about the columns as well as the data rows. It doesn't work with a straight ResultSet though, it works with a QueryView. It may still provide a useful guide.

We have ExtJS store implementations that translate this JSON into a standard Store. As you may know, ExtJS made significant changes to how its Stores work between versions 3 and 4, so there are different implementations in server/api/webapp/clientapi/ext3/data/Store.js and server/api/webapp/clientapi/ext4/data/Store.js.

Thanks,
Josh