Archive for the 'CFJSON' Category
CFJSON version 1.7
Friday, March 2nd, 2007

Today I had some free time and decided to implement some bug fixes for CFJSON. Many thanks to Larry Reinhard who not only provided many fixes but actually built a unit test for them. Wow! That makes my work that much easier! Steve Nelson also contributed and I thank him for that.

After implementing Larry’s changes I so happened to read a post on Ben Nadel’s blog about a problem with a JSON string that had a carriage return. This incited me to go and check if special characters were properly handled, and I discovered that while they were as far as encoding, the decoding was not correct. In the process of fixing this I discovered a serious bug that caused errors when there was one double-quote in a string within a complex data type. I tracked it down to an inexplicable problem with a loop, whereby I incremented the loop’s index value to essentially skip an iteration, but for whatever reason on the next iteration the value of the index was reset to the original value it would have had if I hadn’t incremented it. Mystery… I just changed the loop to a conditional loop where I incremented values myself and that solved my problem.

So given the bugs mentioned above, this version of CFJSON is a must download. Hopefully there won’t be too many serious problems from now on, the transition from one owner to the next and implementation of accumulated code/bug fixes/features made it so some unpleasant stuff crept in, but it’s looking under control now. Thanks again to all the contributors!

DOWNLOAD CFJSON v1.7
GO TO THE CFJSON SITE

Another CFJSON patch
Tuesday, February 13th, 2007

John Farrar reported that CFJSON was outputing a lot of whitespace and needed output=”no” added to the functions. I can’t believe I forgot about that, it’s quite pathetic… But it’s there now in the latest patch, version 1.6c, download away on the CFJSON site!

CFJSON patches
Friday, February 9th, 2007

I’ve made a few small changes to CFJSON yesterday and today to accomodate some requests. The patches are small but useful. I will try to document the less obvious features, like the recently added “queryKeyCase” and “queryFormat” arguments of the encode() method. They’re not make-it-or-break it functionality, but they could come in handy. If you don’t want to wait for docs, it’s easy to figure them out just by looking at the code.

CHECK OUT CFJSON HERE