Class Configuration
The Configuration class provides various options that allow you to control the behaviour of the serializer.
Methods summary
public
|
#
getMetaHintWhitelist( )
Configures the whitelist that should be used to determine which classes may be used as meta type hints during deserialization. |
public
|
|
public
|
|
public
|
|
public
|
#
__construct( Interop\Container\ContainerInterface $container = null, boolean $loadDefaultConverters = true )
|
public
|
|
public
string
|
Properties summary
public
boolean
|
$strictTypeResolution
When enabled, a MissingTypeException will be thrown if the provided type hint or embedded type cannot be found. Otherwise the type information will be disregarded. |
#
false
|
public
boolean
|
$embedTypeMetadata
When enabled, type information will be embedded in serialized objects. This type information can be |
#
true
|
public
boolean
|
$prettyPrint
Enable/disable pretty JSON printing. |
#
false
|
public
integer
|
$jsonEncodeOptions
Option flags that are passed to the internally used json_encode() and json_decode() functions. |
#
0
|
public
boolean
|
$includeNullValues
Specifies whether members with null values should be included in serialization. |
#
false
|
public
integer
|
$maxDepth
Specifies the maximum serialization depth for the internally used json_encode() and json_decode() functions. |
#
32
|
public
integer
|
$defaultReferenceResolutionStrategy
Specifies the default strategy for resolving references when deserializing. |
#
OneOfZero\Json\ReferenceResolutionStrategy::LAZY
|
public
integer
|
$defaultMemberInclusionStrategy
Specifies one or more kinds of members that will be automatically included during serialization. |
#
OneOfZero\Json\IncludeStrategy::PUBLIC_PROPERTIES
|
public
integer
|
$defaultRecursionHandlingStrategy
Specifies the default handling strategy that will be used when recursion is detected during serialization. |
#
OneOfZero\Json\OnRecursion::THROW_EXCEPTION
|
public
integer
|
$defaultMaxDepthHandlingStrategy
Specifies the default handling strategy that will be used when the maximum depth is reached. |
#
OneOfZero\Json\OnMaxDepth::THROW_EXCEPTION
|
public
|
$contractResolver
Configures the contract resolver to use during serialization and deserialization. |
#
null
|