Method | Description | |
---|---|---|
__construct ( |
Creates a new decoder. | |
decode ( string $json, string | object $schema = null ) : mixed | Decodes and validates a JSON string. | |
decodeFile ( string $path, string | object $schema = null ) : mixed | Decodes and validates a JSON file. | |
getBigIntDecoding ( ) : integer | Returns the decoding of big integers. | |
getMaxDepth ( ) : integer | Returns the maximum recursion depth. | |
getObjectDecoding ( ) : integer | Returns the decoding of JSON objects. | |
setBigIntDecoding ( integer $decoding ) | Sets the decoding of big integers. | |
setMaxDepth ( integer $maxDepth ) | Sets the maximum recursion depth. | |
setObjectDecoding ( integer $decoding ) | Sets the decoding of JSON objects. |
Method | Description | |
---|---|---|
decodeJson ( $json ) |
public __construct ( |
||
$validator |
public getBigIntDecoding ( ) : integer | ||
return | integer | One of the constants {@link FLOAT} and {@link JSON_STRING} |
public getMaxDepth ( ) : integer | ||
return | integer | The maximum recursion depth |
public getObjectDecoding ( ) : integer | ||
return | integer | One of the constants {@link JSON_OBJECT} and {@link ASSOC_ARRAY} |
public setBigIntDecoding ( integer $decoding ) | ||
$decoding | integer | One of the constants {@link FLOAT} and {@link JSON_STRING} |
public setMaxDepth ( integer $maxDepth ) | ||
$maxDepth | integer | The maximum recursion depth |
public setObjectDecoding ( integer $decoding ) | ||
$decoding | integer | One of the constants {@link JSON_OBJECT} and {@link ASSOC_ARRAY} |