110,534
社区成员
发帖
与我相关
我的任务
分享
dic<string,List<Model>>
其中model为
public class model
{
public string offceid{get;set;}
public ....
}
JsonSerializerSettings setting = new JsonSerializerSettings()
{
ReferenceLoopHandling = ReferenceLoopHandling.Ignore
};
var ret = JsonConvert.SerializeObject(obj, setting);
//关闭延迟加载
//db.Configuration.LazyLoadingEnabled = false;
return new JsonResult() { Data = ret, MaxJsonLength = int.MaxValue, ContentType = "application/json" };