1 | <?php |
||
12 | class JsonDecoder implements DecoderInterface |
||
13 | { |
||
14 | /** @var array Decoded data */ |
||
15 | protected $arrayData = []; |
||
16 | |||
17 | /** |
||
18 | * Decodes JSON data to array |
||
19 | * |
||
20 | * @param $data string |
||
21 | * @return array |
||
22 | * @throws JsonDecodingFailedException |
||
23 | */ |
||
24 | public function decode($data) |
||
36 | |||
37 | /** |
||
38 | * Returns MimeType |
||
39 | * @return string[] |
||
40 | */ |
||
41 | public function getMimeType() |
||
45 | |||
46 | /** |
||
47 | * Checks if the input is really a json string and if the PHP Json decoding was successful. |
||
48 | * @return boolean |
||
49 | */ |
||
50 | protected function isValidJson() |
||
54 | } |
||
55 |