options = $options; $this->depth = $depth; } public function encode($payload): string { return \json_encode($payload, $this->options, $this->depth); } public function decode(string $payload, bool $associativeArray = true) { return \json_decode($payload, $associativeArray, $this->depth, $this->options); } }