C# BackJson Beautiful format

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
 
public class ComBase
{
public string result { get; set; }
 
public ComBase(string data)
{
this.result = data;
}
}
 
public class ComRsp
{
public int code { get; set; }
public string msg { get; set; }
public ComBase data { get; set; }
 
public string BackJson(int code, string msg, string data)
{
this.code = code;
this.msg = msg;
this.data = new ComBase(data);
return Common.EntityToJson(this);
}
}
 
 
posted @ 2017-03-30 15:40 araki 阅读(...) 评论(...) 编辑 收藏