Class MOXMAN_Util_JsonDecoder

InheritanceMOXMAN_Util_JsonDecoder

JSON decoder written in native PHP. This can be used as a fallback for earlier PHP versions that didn't have native JSON support.

Public Methods

Hide inherited methods

MethodDescriptionDefined By
decode() Decodes the specified JSON string into an native PHP type. MOXMAN_Util_JsonDecoder

Constants

Hide inherited constants

ConstantValueDescriptionDefined By
LOC_IN_ARRAY 30 MOXMAN_Util_JsonDecoder
LOC_IN_BETWEEN 50 MOXMAN_Util_JsonDecoder
LOC_IN_OBJECT 40 MOXMAN_Util_JsonDecoder
TOKEN_BOOL 1 MOXMAN_Util_JsonDecoder
TOKEN_END_ARRAY 9 MOXMAN_Util_JsonDecoder
TOKEN_END_OBJ 7 MOXMAN_Util_JsonDecoder
TOKEN_FLOAT 4 MOXMAN_Util_JsonDecoder
TOKEN_INT 2 MOXMAN_Util_JsonDecoder
TOKEN_KEY 10 MOXMAN_Util_JsonDecoder
TOKEN_NULL 5 MOXMAN_Util_JsonDecoder
TOKEN_SKIP 11 MOXMAN_Util_JsonDecoder
TOKEN_START_ARRAY 8 MOXMAN_Util_JsonDecoder
TOKEN_START_OBJ 6 MOXMAN_Util_JsonDecoder
TOKEN_STR 3 MOXMAN_Util_JsonDecoder

Method Details

decode() public static method

Decodes the specified JSON string into an native PHP type.

public static Mixed decode ( $data )
$data string

JSON string to parse.

return Mixed

Native PHP type based on JSON data.