public static string GridData(object data, long Total, bool ShowFooter)
        {
            string str = "{\"total\":0,\"rows\":[]}";

            if (data != null)
            {
                str = "{\"total\":" + Total.ToString() + ",\"rows\":" + DefaultResolver.Convert(data) + "}";
            }
            return(str);
        }
        public static string Data(object data)
        {
            string str = "[]";

            if (data != null)
            {
                str = DefaultResolver.Convert(data);
            }
            return(str);
        }
        public static string JsonData(object data, int Total, params JsonAttribute[] Attrs)
        {
            if (data == null)
            {
                return("{\"success\":true,\"total\":0,  \"data\":[]}");
            }
            StringBuilder builder = new StringBuilder();

            using (new StringWriter())
            {
                builder.Append("{\"success\":true,\"total\":");
                builder.Append(Total.ToString());
                builder.Append(",\"data\":");
                builder.Append(DefaultResolver.Convert(data));
                foreach (JsonAttribute attribute in Attrs)
                {
                    builder.Append(string.Format(",\"{0}\":{1}", attribute.Name, DefaultResolver.Convert(attribute.Value)));
                }
                builder.Append("}");
            }
            return(builder.ToString());
        }