Downloads
Version 1.9 - February 20th, 2008 [ download ]
- Removed single quote from list of espace characters (Carl Anderson)
- Made changes so UNC paths would work (Andi Zipfel)
- Made changes so string concatenation is done with Java StringBuffers (Doug Boude)
- Fixed decode() function so that colons inside an object key are supported (Thomas Messier, thanks to Phil Howson for pointing this out)
- Changes for improved regexps and to removal of some overhead (Steven Levithan)
Version 1.8 - May 12th, 2007 [ download ]
- added escaping of forward-slashes (while optional this feature is used by such prominent companies as Yahoo, so I thought it best to include it in decode, and then to be consistent added it to encode as well) (Thomas Messier; thanks to Ray Camden for pointing this out)
- added an optional stringNumbers argument to the encode function, when true it will encode numbers as strings (useful if you have strings formatted like 5.1000 that you don't want converted to 5.1 by javascript); defaults to false (Carl Anderson)
- added an optional formatDates argument to the encode function, when true it formats dates to a format such as this: May 12, 2007 2:45:02 PM; this can be used more easily by javascript's new Date() constructor (useful if you have dates in {ts '2007-04-15 16:03:25'} format); defaults to false (Thomas Jaworski)
Version 1.75 - March 25th, 2007 [ download ]
- modified encode function to lower case boolean values (Chris Bestall)
- changed the decode function so yes and no (without surrounding quotes) are not seen as valid values (Thomas Messier)
- made CFJSON throw an error for invalid JSON as opposed to just returning a string value (Thomas Messier)
- added validate function to validate a JSON document with a JSON schema; this is very preliminary, see article here for an introduction to the implementation of a JSON schema; feedback on this would be very appreciated (Thomas Messier)
Version 1.7 - March 1st, 2007 [ download ]
- fixed bug whereas complex data types with double quotes would provoke errors (Thomas Messier)
- added support for null values in decode, returning empty strings (Larry Reinhard)
- improved support for boolean and number encoding (Larry Reinhard)
- added code so that numbers with leading zeros are treated as strings to avoid losing data (Larry Reinhard)
- changed "data" variable to local _data variable (Larry Reinhard)
- added support for decoding other special characters like tabs, carriage return, etc. (Thomas Messier)
- fixed bug where empty query was returned as a struct (Steve Nelson)
Version 1.6c - February 13th, 2007 [ download ]
- added output="no" to the functions and component to eliminate whitespace (John Farrar)
Version 1.6b - February 9th, 2007 [ download ]
- added a "queryKeyCase" argument to the encode() method that takes either "lower" or "upper" as a value and returns the query column names in the selected case (Thomas Messier)
- modified the "queryFormat" parameter of the encode() method to take "query" and "array" as values as opposed to "query" and "struct" (don't know why I used struct the first time); it shouldn't affect anybody's code, because if you put something other than "query" or "array" it will default to "array" anyway, so those who have put "struct" in there will not have any problems (Thomas Messier)
Version 1.6a - February 8th, 2007 [ download ]
- added access="remote" to the functions so that they can be exposed as web services via CF; added an appropriate returntype to each function (Andrew Powell)
Version 1.6 - February 4th, 2007 [ download ]
- code wrapped as a component (Thomas Messier)
- code to convert js object back to query (John Farrar and David Boyer)
- fix for empty arrays and structs (Thomas Messier and Ryan Thompson)
- fix for case of struct key name (Chun Pan)
- better handling of unknown objects (Zach Pitts)
- added queryFormat argument to encode() method which allows you to encode a query as a structure of arrays (normal query format)
or array of structures (sometimes more convenient); if you're not sure what this means, test it out with a query and it'll be obvious (Thomas Messier)
Version 1.5 - March 30th, 2006 [ download ]
- fix for "0" deserialzing as false - Sunil Vulli / Christine Pembleton
- lowercase query serialziation - David Boyer
Version 1.4 - January 10th, 2006 [ download ]
- fix for structure keys which have spaces in them -Eric
Version 1.3 - December 16th, 2005 [ download ]
- fix for blank strings / true&false values -Eric
- fix for number handling - Dave Merrill
- fix for empty struct - Andy Lewis
Version 1.2 - August 20th, 2005 [ download ]
- fix for boolean data - Ray Camden
- newlines in encoded strings - Sam Curren
Version 1.1 - May 13th, 2005 [ download ]
- support for serializing queries as structure of arrays in jsonencode()
- fixed missing commas between columns in query serialization - thanks to Darryl Lyons
Version 1.0 - May 12th, 2005 [ download ]