public static T ValidateJson <T>(this NameValueCollection parameters, string name) where T : class { try { return(TopUtils.JsonParser <T>(parameters[name])); } catch { throw new TopException(ERR_CODE_PARAM_INVALID, string.Format(ERR_MSG_PARAM_INVALID, name)); } }