Why not use cfjson.cfc?

I tried cfjson.cfc and it is a very good cfc for changing ColdFusion structures to JSON data. In a query it puts all of the values for a column into an array. What I was using is toXML.cfc, which keeps each record's columns together. That is how I write my applications and that is what I am most comfortable using.

toJSON puts each record into an array and then sets name value pairs as "column name" : "value". This creates a larger file than cfjson.cfc. It is still much smaller than XML.

Related Blog Entries

Comments
dave's Gravatar I think cfc file most people use the XML file document.
# Posted By dave | 5/9/08 2:47 AM
vincent's Gravatar I agree dave ,most people use xml filetype,my site is http://www.qxiu.com,luck to see you blog
# Posted By vincent | 5/9/08 2:51 AM
Doug Laakso's Gravatar Try comparing the size of your XML file, with the same data in JSON. This size difference is significant enough that your user's will have less time lag in your web pages.
# Posted By Doug Laakso | 5/9/08 9:48 AM
BlogCFC was created by Raymond Camden. This blog is running version 5.5.006.