You are here

public function JsonEncoder::__construct in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/serializer/Encoder/JsonEncoder.php \Symfony\Component\Serializer\Encoder\JsonEncoder::__construct()

File

vendor/symfony/serializer/Encoder/JsonEncoder.php, line 33

Class

JsonEncoder
Encodes JSON data.

Namespace

Symfony\Component\Serializer\Encoder

Code

public function __construct(JsonEncode $encodingImpl = null, JsonDecode $decodingImpl = null) {
  $this->encodingImpl = $encodingImpl ?: new JsonEncode();
  $this->decodingImpl = $decodingImpl ?: new JsonDecode(true);
}