decode() public method

public decode ( $data )
Example #1
0
 public function testDecoding()
 {
     $formatter = new JSON();
     $data = (object) array('name' => 'Joe', 'age' => 21, 'employed' => true);
     $raw = '{"name":"Joe","age":21,"employed":true}';
     $this->assertEquals($data, $formatter->decode($raw));
 }