Hi there,

I'm having trouble accessing JSON data from a controller. (I'm using
cake version 1.2). My JSON request is as follows:

$.getJSON(
'/locations/find',
{s1:val1, s2:val2},
function callback(data){
   //doStuff
});

I know that the JSON request is made just fine because when I tried it
with empty params I got the response OK. The trouble is that I get
errors if i try to access the data from the controller using:

//$val = $this->params['val'];

Do i need to decode the JSON string? I've tried $this->params, $this-
>data but none seem to do it as they are only used for http POST
commands. Note that I m not using any ajax or json helpers/components
etc.

Thanks,

jason
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to