unmarshal into the given interface or return err