1 | <?php |
||
15 | class Json |
||
16 | { |
||
17 | /** |
||
18 | * Returns the JSON representation of a value. |
||
19 | * |
||
20 | * @param mixed $data |
||
21 | * |
||
22 | * @return string |
||
23 | */ |
||
24 | public static function encode($data) |
||
36 | |||
37 | /** |
||
38 | * Decodes a JSON string. |
||
39 | * |
||
40 | * @param string $jsonString |
||
41 | * @param boolean $assoc If should be converted into associative array/s. |
||
42 | * |
||
43 | * @return mixed |
||
44 | */ |
||
45 | public static function decode($jsonString, $assoc = false) |
||
53 | |||
54 | /** |
||
55 | * @param int $status |
||
56 | * |
||
57 | * @throws \RuntimeException |
||
58 | */ |
||
59 | protected static function handleError($status) |
||
85 | } |
||
86 |