jrbasso's Profile
Recent Articles
Generating automatized JSON as output
Published by jrbasso on 26/10/08This article will show how you can generate JSON (JavaScript Object Notation) output without make a layout or ctp for this.
This article will show how you can generate JSON (JavaScript Object Notation) output without make a layout or ctp for this.
You can see in http://github.com/cakephp/datasources.
I have used this in my AppController to show the results that sended to views, it's includes all actions, see:
function beforeRender() {
if (Configure::read() > 0 && version_compare(PHP_VERSION, '5.2')) {
fb($this->viewVars);
}
}
The file of helper is on: http://blog.cakephp-brasil.org/wp-content/uploads/2008/08/asset.zip
The changes list is in comments on file.