public static function error($json)
    {
        $fields = Deserialize::_fromJson($json);

        $result = new Api\Error();
        $result->setCode($fields->code);
        $result->setText($fields->text);

        return $result;
    }
public static function error($json)
    {
        $fields = Deserialize::_fromJson($json);

        $result = new Api\Error();
        $result->setCode($fields->code);
        $result->setText($fields->text);

        return $result;
    }
public static function error ( $ json ) { $ fields = Deserialize :: _fromJson ( $ json ) ; $ result = new Api \ Error ( ) ; $ result -> setCode ( $ fields -> code ) ; $ result -> setText ( $ fields -> text ) ; return $ result ; }
Reads a JSON blob containing an error response.

@param string $json a JSON formatted text

@return Api\Error the decoded error
Reads a JSON blob containing an error response .