• Newtonsoft.Json 方法使用()


    JSON.NET1.3.0,旧版本的json.net,使用Newtonsoft.Json.JavaScriptConvert.DeserializeObject类进行转换

    如果是版本的json.net,如JSON.NET 4.0,已经转移到Newtonsoft.Json.JsonConvert类下面,Newtonsoft.Json.JsonConvert.DeserializeObject。

    所以如果你找不到JavaScriptConvert类,那是你的版本的问题。

    SetCarrier sc = Newtonsoft.Json.JavaScriptConvert.DeserializeObject<SetCarrier>(data);
    SetCarrier sc = Newtonsoft.Json.JavaScriptConvert.DeserializeObject<SetCarrier>(data);
    ViewData["TaskBaseData"] = Newtonsoft.Json.JavaScriptConvert.SerializeObject(task);
    K_AssessTask model = Newtonsoft.Json.JavaScriptConvert.DeserializeObject<K_AssessTask>(baseData);
    List<K_Bran_TiKu> items = Newtonsoft.Json.JavaScriptConvert.DeserializeObject<List<K_Bran_TiKu>>(itemData);
    Dictionary<string, object> svalue = Newtonsoft.Json.JavaScriptConvert.DeserializeObject<Dictionary<string, object>>(sdata);
    Dictionary<string, object> svalue = Newtonsoft.Json.JavaScriptConvert.DeserializeObject<Dictionary<string, object>>(sdata);
    Dictionary<string, object> svalue = Newtonsoft.Json.JavaScriptConvert.DeserializeObject<Dictionary<string, object>>(strList);
    Dictionary<string, object> svalue = Newtonsoft.Json.JavaScriptConvert.DeserializeObject<Dictionary<string, object>>(strList);
    Dictionary<string, object> svalue = Newtonsoft.Json.JavaScriptConvert.DeserializeObject<Dictionary<string, object>>(SearchInfo);
    Dictionary<string, object> svalue = Newtonsoft.Json.JavaScriptConvert.DeserializeObject<Dictionary<string, object>>(SearchInfo);
    Dictionary<string, object> svalue = Newtonsoft.Json.JavaScriptConvert.DeserializeObject<Dictionary<string, object>>(strList);
    SetCarrier sc = Newtonsoft.Json.JavaScriptConvert.DeserializeObject<SetCarrier>(data);
    SetCarrier sc = Newtonsoft.Json.JavaScriptConvert.DeserializeObject<SetCarrier>(data);
    RecordCarrier rc = Newtonsoft.Json.JavaScriptConvert.DeserializeObject<RecordCarrier>(data);
    ViewData["TaskBaseData"] = Newtonsoft.Json.JavaScriptConvert.SerializeObject(task);
    K_AssessTask model = Newtonsoft.Json.JavaScriptConvert.DeserializeObject<K_AssessTask>(baseData);
    List<K_TaskTiKu> items = Newtonsoft.Json.JavaScriptConvert.DeserializeObject<List<K_TaskTiKu>>(itemData);
    Dictionary<string, object> svalue = Newtonsoft.Json.JavaScriptConvert.DeserializeObject<Dictionary<string, object>>(SearchInfo);
    IList<K_UserAssessResultSubject> svalue = Newtonsoft.Json.JavaScriptConvert.DeserializeObject<IList<K_UserAssessResultSubject>>(sdata);
    Dictionary<string, object> svalue = Newtonsoft.Json.JavaScriptConvert.DeserializeObject<Dictionary<string, object>>(sdata);
    Dictionary<string, object> svalue = Newtonsoft.Json.JavaScriptConvert.DeserializeObject<Dictionary<string, object>>(strList);
    Dictionary<string, object> svalue = Newtonsoft.Json.JavaScriptConvert.DeserializeObject<Dictionary<string, object>>(strList);
    ViewData["TaskBaseData"] = Newtonsoft.Json.JavaScriptConvert.SerializeObject(task);
    K_AssessTask model = Newtonsoft.Json.JavaScriptConvert.DeserializeObject<K_AssessTask>(baseData);
    Dictionary<string, object> svalue = Newtonsoft.Json.JavaScriptConvert.DeserializeObject<Dictionary<string, object>>(SearchInfo);
  • 相关阅读:
    纯CSS气泡框实现方法探究
    CSS教程:div垂直居中的N种方法[转]
    内容超过长度后以省略号显示
    mCustomScrollbar
    js获取页面元素距离浏览器工作区顶端的距离
    nicescroll参数
    input-placeholder获取焦点清空
    bootstrap去除默认的点击留白处摸态框消失
    【转载 | 笔记】IIS无法删除应该程序池 因为它包含X个应用程序
    【转载】npm查看全局安装过的包
  • 原文地址:https://www.cnblogs.com/wolfocme110/p/4703767.html
Copyright © 2020-2023  润新知