C#中使用Newtonsoft.Json(Json.NET)的建立Json文件和解析

1、添加引用html using Newtonsoft.Json;json 2、調用代碼:.net //獲取圖書列表 List<BookInfo> bookList = GetBookList(); //將圖書列表轉換成Json string bookListJson = JsonConvert.SerializeObject(bookList); //將Json轉換回圖書
相關文章
相關標籤/搜索