public function decode($json)
    {
        $decoded = json_decode($json, true);
        if (null !== $decoded) {
            return $decoded;
        }
        if (JSON_ERROR_NONE === json_last_error()) {
            return $json;
        }

        return self::$json_errors[json_last_error()];
    }
public function decode($json)
    {
        $decoded = json_decode($json, true);
        if (null !== $decoded) {
            return $decoded;
        }
        if (JSON_ERROR_NONE === json_last_error()) {
            return $json;
        }

        return self::$json_errors[json_last_error()];
    }
public function decode ( $ json ) { $ decoded = json_decode ( $ json , true ) ; if ( null !== $ decoded ) { return $ decoded ; } if ( JSON_ERROR_NONE === json_last_error ( ) ) { return $ json ; } return self :: $ json_errors [ json_last_error ( ) ] ; }
Decodes json response
@param  string $json
@return array
Decodes json response