cakephp 2.2.2 で Json view

<?php // app/Controller/AbcController.php class AbcController extends AppController {  public function index()  {   $this->viewClass = ‘Json’;
  $this->set(‘aaa’, 1);
  $this->set(‘bbb’, “b”);
  $this->set(‘ccc’, array(‘c’=>3));
  $this->set(‘_serialize’, array(‘aaa’,’bbb’,’ccc’));
 }
}

実行結果
{
 ”aaa”: 1,
 ”bbb”: “b”,
 ”ccc”: {“c”: 3}
}