public static function decode($string)
    {
        if (! is_string($string)) {
            throw new JsonException('Json decode parameter must be a string');
        }

        $result = json_decode($string, true);

        if ($result === null) {
            throw new JsonException('Json decode error');
        }
        return $result;
    }
public static function decode($string)
    {
        if (! is_string($string)) {
            throw new JsonException('Json decode parameter must be a string');
        }

        $result = json_decode($string, true);

        if ($result === null) {
            throw new JsonException('Json decode error');
        }
        return $result;
    }
public static function decode ( $ string ) { if ( ! is_string ( $ string ) ) { throw new JsonException ( 'Json decode parameter must be a string' ) ; } $ result = json_decode ( $ string , true ) ; if ( $ result === null ) { throw new JsonException ( 'Json decode error' ) ; } return $ result ; }
Decode a Json string to return an array content.

@param mixed $string The string to decode.

@return mixed The decoded json.

@throws JsonException If the string can not be decoded.
Decode a Json string to return an array content .