亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

將 json 響應轉換為 C# 變量

將 json 響應轉換為 C# 變量

C#
慕少森 2021-06-29 13:11:18
如何在控制臺應用程序中將返回的 JSON 值轉換為變量?我從 rest api 調用中得到多個公司(750+)的 JSON 響應并將其寫入控制臺應用程序,如下所示:"companies": [    {        "guid": "81eb95d6-d89e-4e93-aad0-eff89a450fcf",        "name": "Example Company 1",        "rating": 770,        "rating_date": "2018-05-27"          },    {        "guid": "81eb95d6-d89e-4e93-aad0-eff89a450fcf",        "name": "Example Company 2",        "rating": 810,        "rating_date": "2018-05-27"    },    {        "guid": "81eb95d6-d89e-4e93-aad0-eff89a450fcf",        "name": "Example Company 3",                  "rating": 760,        "rating_date": "2018-05-27"    },`使用 SharePoint 客戶端,然后我希望將這些公司值作為共享點列表中的項目上傳。    {        ClientContext context = new  ClientContext("http://exampleSharepoint/List");        List companiesList = context.Web.Lists.GetByTitle("Companies");        ListItemCreationInformation itemCreateInfo = new ListItemCreationInformation();        ListItem newItem = companiesList.AddItem(itemCreateInfo);        newItem["Title"] = CompanyTitle;        newItem["guid"] = Guid;        newItem["Rating"] = Rating;        newItem["Rating Date"] = RatingDate;        newItem.Update();        context.ExecuteQuery();    }我看過 json deserializer,但很難將它應用到我的上下文中。任何幫助深表感謝。
查看完整描述

1 回答

  • 1 回答
  • 0 關注
  • 157 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號