Managed Hosting



Project Home Blog Known Issues Contact Project

Author: Nathan Mische (All RIAForge projects by this author)
Admins: Adam Tuttle
Last Updated: June 3, 2014 9:16 AM
Version: 1.5
Views: 113,992
Downloads: 3,719
License: Apache License, Version 2


The JSONUtil project has two goals. The first is to provide JSON serialization and deserialization methods for CFMX 7 and other CFML engines which are compatible with ColdFusion's Serialize/DeserializeJSON functions. The second is to provide better mapping between CF/Java/SQL data types and JavaScript data types for JSON serialization on all CFML engines.

The JSONUtil project currently consists of the JSONUtil component. This component has two public methods, serializeJSON and deserializeJSON, which have method signatures similar to ColdFuison's built in Serialize/DeserializeJSON functions. The JSONUtil deserializeJSON method takes the same parameters as DeserializeJSON, JSONVar and strictMapping, and should produce the same results as that function. The JSONUtil serializeJSON method takes the var and serializeQueryByColumns parameters, just as ColdFusion's built in SerializeJSON function, however this method also takes an optional third parameter, strictMapping. If the strictMapping parameter is not provided or set to false the serialize method should produce the same results as ColdFusion's built in SerializeJSON function. If the Boolean strictMapping parameter is set to true, then the serialize method attempts to convert the ColdFusion data to a JSON string using underlying Java/SQL data types as opposed to using ColdFusion's implicit type conversion conventions.

The code for the JSONUtil component is based on that of the json.cfc from the CFJSON project, http://www.epiphantastic.com/cfjson. This project probably would not have happened were it not for CFJSON. Thank you to Jehiah Czebotar, Thomas Messier, and everyone who has contributed to the CFJSON project.

Recent Blog Entries:


ColdFusion MX 7
ColdFusion 8
ColdFusion 9

Issue Tracker:

16 Support for Lucee >= Fixed 07/08/15 10:25 AM
15 IsDefined("_data.#arKeys[i]#") doesn't work when the struct keys are numeric Open 12/04/14 1:13 PM
14 data.charAt needs cast to int Open 12/04/14 1:07 PM
13 unvared variables Fixed 06/03/14 9:16 AM
12 Exponential Notation is lost for numbers Open 07/31/13 8:51 PM

View All Issues

To enter issues for this (or any other) project, you must be logged in.

Subversion Access:

You may access this project's Subversion repository with your client here: http://svn.riaforge.org/jsonutil.

To view files and changelists associated with this repository, go here: http://jsonutil.riaforge.org/index.cfm?event=page.svnbrowse.

Anonymous users have read access to the repository while the administrator has write access.

This project is sharing its code via Subversion. Subversion is an open source source control method. You may find more information about Subversion here: http://subversion.tigris.org/