Welcome Guest, Not a member yet? Register   Sign In
JSON Decode
#2

[eluser]GSV Sleeper Service[/eluser]
RTFM!
Code:
/**
     * public method
     *
     *    FastJSON::decode(params:String[, useStdClass:Boolean]):*
     *
     * @param    String    valid JSON encoded string
     * @param    Bolean    uses stdClass instead of associative array if params contains objects (default false)
     * @return    *    converted variable or null
     *                is params is not a JSON compatible string.
     * @note    This method works in an optimist way. If JSON string is not valid
     *         the code execution will die using exit.
     *        This is probably not so good but JSON is often used combined with
     *        XMLHttpRequest then I suppose that's better more protection than
     *        just some WARNING.
     *        With every kind of valid JSON string the old error_reporting level
     *        and the old error_handler will be restored.
     *
     * @example
     *        FastJSON::decode('{"param":"value"}'); // associative array
     *        FastJSON::decode('{"param":"value"}', true); // stdClass
     *        FastJSON::decode('["one",two,true,false,null,{},[1,2]]'); // array
     */


Messages In This Thread
JSON Decode - by El Forum - 04-23-2008, 12:05 PM
JSON Decode - by El Forum - 04-23-2008, 12:17 PM
JSON Decode - by El Forum - 04-23-2008, 12:19 PM
JSON Decode - by El Forum - 04-23-2008, 12:27 PM
JSON Decode - by El Forum - 04-23-2008, 07:55 PM



Theme © iAndrew 2016 - Forum software by © MyBB