Skip to main content
Ben Nadel at CFinNC 2009 (Raleigh, North Carolina) with: Critter Gewlas
Ben Nadel at CFinNC 2009 (Raleigh, North Carolina) with: Critter Gewlas ( @Critter )

Javascript Object Notation (JSON) Is What I Meant

By on

I have been of late learning about AJAX and its integration with a ColdFusion application. As I started to understand the whole Xml Http Connection object and methodology I started to develop a form of dynamic Javascript code that would be passed back from the ColdFusion server and then evaluated by the web browser at the end of the AJAX call. It turns out, not suprisingly, that that already exists. It's called JSON or Javascript Object Notation. Furthermore, JSON looks very in depth in a conversion area where I only began to scratch the surface. Very cool stuff. So now, I get to look into JSON and see how it can be incorporated into my ColdFusion application framework. From what I have read so far, it seems they have conversion scripts for most scripting languages. Even if they don't I can always convert something from ASP or PHP to ColdFusion.

Reader Comments

15,377 Comments

@John,

Right, but what does that mean? JSON is just a data formatting standard (like XML). What are you trying to do with it in JRUN?

6 Comments

Ben,

I am trying to send json object as a response through webservice deployed in JRUN server, to a request raised from aspx file. But it failed. If we try sending a String as response it works well.

Thanks

15,377 Comments

@John,

I am not too familiar with the .NET framework or ASPX. I can tell you that when I want to return JSON from a ColdFusion application, I just use this:

<cfcontent
type="application/json"
content="#toBinary( toBase64( myJSONString ) )#"
/>

My JSON values are always strings - I am not sure what difference you mean between JSON and "String" as I typically view these as one and the same in ColdFusion. I think you might need to talk to someone who knows more about .NET specifically.

6 Comments

@Ben,

Thanks for your reply.. We are currently returning the json object as string too.

Thank you so much for your help.

Appreciate it :)

I believe in love. I believe in compassion. I believe in human rights. I believe that we can afford to give more of these gifts to the world around us because it costs us nothing to be decent and kind and understanding. And, I want you to know that when you land on this site, you are accepted for who you are, no matter how you identify, what truths you live, or whatever kind of goofy shit makes you feel alive! Rock on with your bad self!
Ben Nadel