Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个像这样的简单 JSON 数组:
"{0: "4", 1: "5"}"
如何在 ASP.NET MVC 中反序列化这个 JSON 数组?
大多数 ASP.NET MVC 应用程序为此目的使用JSON.NET 库。在这种情况下,你会这样做:
var numbers = JsonConvert.DeserializeObject<List<string>>("{0: \"4\", 1: \"5\"}");