Methods summary
public static
string
|
#
EncodeJson( mixed $data, integer $flags = 0, integer $depth = 512 )
Parameters
- $data
- $flags
- $depth
- Set the maximum depth. Must be greater than zero, default: 512.
Returns
string
Throws
RuntimeException|JsonException JSON encoding error.
Inheritdocs
|
public static
object
|
#
DecodeJson( string $jsonStr, integer $flags = 0, integer $depth = 512 )
Parameters
- $jsonStr
- $flags
- $depth
- User specified recursion depth, default: 512.
Returns
object
Throws
RuntimeException|JsonException JSON decoding error.
Inheritdocs
|
public static
boolean
|
#
IsJsonString( string $jsonStr )
Parameters
Returns
boolean
See
https://www.ietf.org/rfc/rfc4627.txt
Inheritdocs
|
protected static
string
|
#
getJsonLastErrorMessage( integer $jsonErrorCode )
Return last JSON encode/decode error message, optionally by error code for PHP 5.4.
Return last JSON encode/decode error message, optionally by error code for PHP 5.4.
Parameters
Returns
string
|