a quick look in the code tells me that $this->Js->object() checks if there is native support for json_encode() function and uses that when available. It is also able to add $prefix and $postifx to the JSON result. Internally it uses the Js->value() function if there is no native support for json_encode(). Js->value() calls Js->object() when the variable provided is either array or object, so whatever you do unless you are coding float, int, bool or null you are using both methods anyway ;-)
I personally use json_encode() since I have native support on my dev and prod machines and I do not need $prefix or $postfix. However, I would probably use Js->object() rather than Js->value(). -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php