\SJson

Summary

Methods
Properties
Constants
encode()
decode()
error()
errorMsg()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

encode()

encode(mixed  $object,   $options,   $depth = 512) : string

encode object to json

Parameters

mixed $object
$options
$depth

Returns

string —

json

decode()

decode(string  $str,   $assoc = false,   $depth = 512,   $options) : mixed

decode string to json object

Parameters

string $str
$assoc
$depth
$options

Returns

mixed —

object

error()

error() : integer

get last json encode/decode error code

Returns

integer

errorMsg()

errorMsg() : string

get last json encode/decode error msg

Returns

string