예제 #1
0
 public function to_json($options = array())
 {
     return NimbleSerializer::JSON($this, $options);
 }
예제 #2
0
 public function testSingleToJson()
 {
     $u = User::find('first');
     $out = NimbleSerializer::JSON($u, array('except' => array('updated_at', 'created_at')));
     $this->assertEquals('{"address":"","id":"1","last_name":"","my_int":"1","name":"names1"}', $out);
 }