예제 #1
0
 public function testSetPrettyPrint()
 {
     $value = m(["prop0" => "value", "prop1" => a("value0", "value1"), "prop2" => m(["subProp0" => "value0", "subProp1" => "value1"]), "prop3" => a(true, 1234, 56.78)]);
     $json = new CJson($value);
     $json->setPrettyPrint(true);
     $encJson = $json->encode();
     $json = new CJson($encJson);
     $success;
     $decMap = $json->decode($success);
     $this->assertTrue($success && $decMap->equals($value));
 }