Coldfusion's SerializeJson Sucks!

If I recall correctly CFML is a typeless language. I mean we can really all agree that Coldfusion is typeless right?

Ok now that we have that out of the way lets talk about Adobe's implementation of serializejson(). Serializejson is simply trying to be too damn smart for its own good.

Listen I don't want you to frig with my data, I want you to take my structured data, be it query, structure, or array, or whatever, and simply convert that structure into its JSON equivalent. Don't try to parse my dates, numbers or what not, or even try to. Just take what I give you and simply covert the data from one structure to the other mmmkay?

Since when is 9999999999999999E+10 equal to 9.999999999999999E25. Ok mathematically they are, but did I ask you to be smart and do math? NO, I don't think I did!

Either provide me with enough options that I can influence how numbers and dates are handled or do what Railo does and output everything as strings.

/rant off

Structkeyexists or Yes, No, Maybe So

Perhaps I'm just being picky here but why do some functions in CF return a boolean (true/false) and others return a boolean (yes/no)?

For example StruckKeyExists() is one such culprit it returns a Yes or a No, which in CF is boolean. The problem naturally comes in if you decide to send the results from a StructKeyExits to a language that doesn't understand that yes/no in reality means true/false. Even if you use the serializeJSON() function to convert your data to a JSON formatted string, the Yes/NO does not convert to a boolean in JavaScript whereas a True/False is. In fact serializeJSON converts Yes/No to a string!

The CF9 documentation for StructKeyExists even indicates that the result of the function is True if the key exists. They say nothing about Yes.

[More]

Windows Firewall Blocks While Turned Off

I wasn't going to blog about this separately but this problem really did cause me a lot of time and frustration while setting up my Railo cluster

[More]

9 Lives all at Once

I'm continually amazed at the lack of responsibility people take for their actions, especially when it comes to human - animal relations.

[More]

No Internet AGAIN! Thanks T-Home

So we changed our internet service provider from T-Home. We did this because after doing the math, we ended up paying more for service with 1&1 because we had to pay some stupid montly hook-up fee to Telecom (They probably do this on purpose).

[More]


Powered By Railo

Subscribe

Subscribe via RSS
Follow garyrgilbert on Twitter Follow me on Twitter
Or, Receive daily updates via email.

Tags

adobe air ajax apple cf community cfml coldfusion examples ext flash flex google javascript jquery max2007 max2008 misc open source programming railo software technology ui

Recent Entries

No recent entries.

Blogroll

An Architect's View
CFSilence
Rey Bango
TalkingTree

Wish List

My Amazon.com Wish List