× Sign in with twitter. You can follow the user and hashtags. Share your tips on social media. Post relative tips. If you have relative tips, click [Add relative tips] to post. コントローラー内で viewClassをJsonに設定し、JSONに書き出したい変数名を_serializeにセットする。これだけ。 下記の例ではpostsとsome_varの内容がJSONで書き出される。 <?php //app/Controller/PostsController.php class PostsController extends AppController { public function index() { $thi