A jQuery function that will parse the JSON returned from an ajax call to a remote ColdFusion method and recursively convert any ColdFusion query object into a standard JSON recordset, as recognized by a great number of plugins and libraries.

Standard native ColdFusion query object, as rendered by it's 'json' returnFormat:

        [1,"Ed Spencer","ed@sencha.com"],
        [2,"Abe Elias","abe@sencha.com"],

converted by the method, the output becomes

    {"id":1,"name":"Ed Spencer","email":"ed@sencha.com"},
    {"id":2,"name":"Abe Elias","email":"abe@sencha.com"},

The method will recursively trace each node of the JSON structure, and convert any object it finds with a COLUMNS and a DATA key, including those created by using the ConvertQueryForGrid() method. Note: The method will automatically lower case the column names.


var populateGrid = function (postdata) {
        url: '/com/cc/Blog/Entries.cfc',
        data: {
            method: 'GetEntries',
            returnFormat: 'json'
        success: function(d,r,o){
            d = $.serializeCFJSON(d);
                // do something with the data
            } else {
                // handle the error

This example uses serializeCFJSON to convert the paging data requests used by an instance of jqGrid.


To search for entries on a specific date, use the To field only.