Re: JSON object error

2010-03-12 Thread sandeep saini

Big thanks to Brad and Stephane. It did work properly now once I set format as 
"Plain".



~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:331722
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: JSON object error

2010-03-12 Thread brad

I think you are double encoding your JSON.  You don't need to put
returnFormat="JSON" in the component definition AND use the
SerializeJSON() function.  Pick one.  Your CFC is returning JSON- but it
is a JSON representation of a string that also just so happens to be a
JSON representation of your result set.

~Brad

 Original Message ----
Subject: Re: JSON object error
From: sandeep saini 
Date: Fri, March 12, 2010 3:41 pm
To: cf-talk 


When I use
"http://127.0.0.1:8500/prototype/getData.cfc?method=rptData&idval=04";
in URL, I get following displayed in browser-
"{\"COLUMNS\":[\"REPORT_NAME\"],\"DATA\":[[\"AAA\"],[\"BBB\"]]}" 

Looks like the JSON object is properly get created. Then not sure whats
wrong 



~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:331719
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: JSON object error

2010-03-12 Thread Stephane Vantroyen

Hello, you should return it as 'plain', and not as json (it 'double jsonencode' 
it then)


> When I use "http://127.0.0.1:8500/prototype/getData.
> cfc?method=rptData&idval=04" in URL, I get following displayed 
> in browser-
> "{\"COLUMNS\":[\"REPORT_NAME\"],\"DATA\":[[\"AAA\"],[\"BBB\"]]}" 
> 
> Looks like the JSON object is properly get created. Then not sure 
> whats wrong 


~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:331718
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: JSON object error

2010-03-12 Thread sandeep saini

When I use 
"http://127.0.0.1:8500/prototype/getData.cfc?method=rptData&idval=04"; 
in URL, I get following displayed in browser-
"{\"COLUMNS\":[\"REPORT_NAME\"],\"DATA\":[[\"AAA\"],[\"BBB\"]]}" 

Looks like the JSON object is properly get created. Then not sure whats wrong 

~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:331717
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: JSON object error

2010-03-12 Thread brad

Is the server call erroring?  Use FireBug or MS Fiddler to capture the
actual ajax request and confirm the status code and response body.

~Brad

 Original Message 
Subject: JSON object error
From: sandeep saini 
Date: Fri, March 12, 2010 3:22 pm
To: cf-talk 


guys,

I am getting following error when i access a CFC from Bind attribute of
CFSELECT-

"Bind failed for select box,bind value is not a 2 D array or valid
serialized query."



~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:331716
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


JSON object error

2010-03-12 Thread sandeep saini

guys,

I am getting following error when i access a CFC from Bind attribute of 
CFSELECT-

"Bind failed for select box,bind value is not a 2 D array or valid serialized 
query."

Here is my component:
_

>


select REPORT_NAME from advance.entity t
where t.ID_NUMBER < 





_



~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:331714
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm