SJson
in package
Table of Contents
Methods
- decode() : mixed
- decode string to json object
- encode() : string
- encode object to json
- error() : int
- get last json encode/decode error code
- errorMsg() : string
- get last json encode/decode error msg
Methods
decode()
decode string to json object
public
static decode(string $str[, mixed $assoc = false ][, mixed $depth = 512 ][, mixed $options = 0 ]) : mixed
Parameters
- $str : string
- $assoc : mixed = false
- $depth : mixed = 512
- $options : mixed = 0
Tags
Return values
mixed —object
encode()
encode object to json
public
static encode(mixed $object[, mixed $options = 0 ][, mixed $depth = 512 ]) : string
Parameters
- $object : mixed
- $options : mixed = 0
- $depth : mixed = 512
Tags
Return values
string —json
error()
get last json encode/decode error code
public
static error() : int
Tags
Return values
interrorMsg()
get last json encode/decode error msg
public
static errorMsg() : string