/// <summary> /// 操作成功,单不携带额外的数据 /// </summary> /// <returns></returns> public static string Response(this RestServiceBase restService, IJsonContent content) { var response = new ResponseContent(content) { StatusCode = RestStatus.Success, }; return response.ToJsonString(); }
/// <summary> /// /// </summary> /// <param name="content"></param> /// <param name="converters"></param> /// <returns></returns> public static string ToJsonString(this IJsonContent content, params JsonConverter[] converters) { return(JsonUtils.SerializeObject(content, converters)); }