예제 #1
0
        /// <summary>
        /// 操作结果(返回json字符串)
        /// </summary>
        /// <returns></returns>
        public static string ToJsonStr(int code, string errMsg, object data)
        {
            var instance = new CommonResult(code, errMsg, data);

            return(jss.Serialize(instance));
        }
예제 #2
0
        /// <summary>
        /// 操作失败(返回json字符串)
        /// </summary>
        /// <returns></returns>
        public static string ToJsonStr(string errMsg)
        {
            var instance = new CommonResult(errMsg);

            return(jss.Serialize(instance));
        }