人本善良

导航

EF jsonignore

页面单独指定不循环引用

 [JsonIgnore]
    Newtonsoft.Json.JsonSerializerSettings jsSettings = new Newtonsoft.Json.JsonSerializerSettings();
    jsSettings.ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Ignore;
    string json = Newtonsoft.Json.JsonConvert.SerializeObject(GF_OrdersList, Newtonsoft.Json.Formatting.None, jsSettings);

 

posted on 2016-11-09 20:01  简简单单2018  阅读(419)  评论(0编辑  收藏  举报