JSON in ColdFusion

by @jehiah on 2005-05-14 01:52UTC
Filed under: All , ColdFusion , Javascript , CFJSON

JSON in ColdFusion = CFJSON

I have just finished writing CFJSON which is a ColdFusion implementation of the JSON data format. JSON itself is a lightweight replacement for xml which translates (or serializes if you like) native datatypes into across languages. While xml is great for storing data, it does not map nicely to native data types, nor is it lightweight. JSON fill’s that need. In many ways it is similar to WDDX in that it serializes data. Just with half the bloat. Because JSON is JavaScript Object Notation, it is also perfectly suited for AJAX =)

First things first.

CFJSON is really just two user defined functions jsonencode() and jsondecode(). One serializes native types to JSON format, the other de-serializes JSON format into native coldfusion datatypes.

Check out the CF Examples page »

Or, check out some AJAX + JSON examples »

Both user defined functions are pending submissions to cflib.org

Subscribe via RSS ı Email
Jehiah Czebotar