Copied!

A helper providing autocompletion for available JsonEncoder options.

CloneableFinalInstantiable
Methods
public toArray() : array
 
  • return array<string,mixed>
public withAssociative(?bool $associative) : static
 

Configures whether decoded objects will be given as associative arrays or as nested stdClass.

public withContext(Symfony\Component\Serializer\Context\ContextBuilderInterface|array $context) : static
 
  • param \ContextBuilderInterface|array<string,mixed> $context
public withDecodeOptions(?int $options) : static
 

Configures the json_decode flags bitmask.

  • see https://www.php.net/manual/en/json.constants.php
  • param positive-int|null $options
public withEncodeOptions(?int $options) : static
 

Configures the json_encode flags bitmask.

  • see https://www.php.net/manual/en/json.constants.php
  • param positive-int|null $options
public withRecursionDepth(?int $recursionDepth) : static
 

Configures the maximum recursion depth.

Must be strictly positive.

  • param positive-int|null $recursionDepth
Methods
protected with(string $key, ?mixed $value) : static
Properties
private array $context = []
 
  • var array<string,mixed>
© 2024 Bruce Wells
Search Namespaces \ Classes
Configuration