fastjson 无法序列化匿名类型,代码如下
List<T_FAMILY> list = new List<T_FAMILY>();
T_FAMILY model = new T_FAMILY();
model.BIRTHDATE = DateTime.Now;
model.ID = Guid.NewGuid().ToString();
model.NAME = "lj";
list.Add(model);
var result = new
{
total = 20,
rows = list
};
string str= JSON .Instance.ToJSON(result);
fastjson不支持匿名类型