| 1 | <?php |
||
| 9 | final class JsonTypeEncoder implements TypeEncoderInterface |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * @var bool |
||
| 13 | */ |
||
| 14 | private $prettyPrint; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * @param bool $prettyPrint |
||
| 18 | */ |
||
| 19 | public function __construct(bool $prettyPrint = false) |
||
| 23 | |||
| 24 | /** |
||
| 25 | * @return string |
||
| 26 | */ |
||
| 27 | public function getContentType(): string |
||
| 31 | |||
| 32 | /** |
||
| 33 | * @param array $data |
||
| 34 | * |
||
| 35 | * @return string |
||
| 36 | * |
||
| 37 | * @throws SerializerRuntimeException |
||
| 38 | */ |
||
| 39 | public function encode(array $data): string |
||
| 43 | } |
||
| 44 |