[coldbox-3.5.0] Returning a query as JSON RESTfully using RELAX

Luis,

Andrew is right. I tried this approach and it didn’t work. I tried to pass jsonQueryFormat=array but it didn’t return the type of JSON object I needed. It first returned a structure of columns followed by a structure of values for each wine instead of one structure of key:value pairs for each wine.

My question for you is: what docs are you referencing? Doing a search for “RenderData” in the wiki returns a myriad of different version of the function so i have a feeling I am looking in the wrong place. I opened the function itself to get the info from the horse’s mouth, but if there is a web based up to date version of the docs per version of the framework i want to know about it.

Thanks for all the good info guys!

Yes, apidocs.coldbox.org You can choose your version and it spits out a search interface for your current version of the API. We also have this embedded in ColdFusion Builder

Luis F. Majano
CEO
Ortus Solutions, Corp
www.ortussolutions.com

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com

Social: twitter.com/lmajano facebook.com/lmajano

Hey Jean,

Did you ever figure out how to return key value pairs? The only way I could do this is to use Ben’s QueryToArray function then convert it to json.

Is there a built in queryToArray function in ColdBox?

Did you check the query helper plugin?

Please check my code below. I am receiving this error even after fwreinit.

You are using ColdBox LITE and not ColdBox Platform

signature0.jpg

Luis F. Majano
CEO
Ortus Solutions, Corp
www.ortussolutions.com

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com

Social: twitter.com/lmajano facebook.com/lmajano