The other returnFormat - plain

This post is more than 2 years old.

A friend just sent me a question regarding YUI (Yahoo's Ajax library) and JSON. Apparently YUI wants a JSON format (for query data) that ColdFusion can't handle automatically. He assumed this meant he couldn't speak directly to a CFC. That isn't the case. Don't forget that along with returnFormat=json, you can do use both plain and XML. So if you want to spit out the JSON format that Yahoo will like, you would need to create the string yourself, and use returnFormat=plain in the URL.

Raymond Camden's Picture

About Raymond Camden

Raymond is a senior developer evangelist for Adobe. He focuses on document services, JavaScript, and enterprise cat demos. If you like this article, please consider visiting my Amazon Wishlist or donating via PayPal to show your support. You can even buy me a coffee!

Lafayette, LA

Archived Comments

Comment 1 by Justin Carter posted on 5/17/2008 at 4:41 PM

Great tip Ray :)

Comment 2 by Akira posted on 11/7/2008 at 2:13 AM

Hey Ray,

After quite a bit of digging I found a post on Yahoo that tells how to build JSON that YUI will like.