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!

