asp.net - 如何获取 JSON 字符串化数据

标签 asp.net json

我有一个字符串res = {"responseCode":"3001","re​​sponse":"1533352091995"}

如何从json中仅选择3001?使用 ASP.NET

最佳答案

请找到以下答案:

string jsonData = @"{  
'responseCode':'3001',  
'response':'1533352091995'  
}";  

var details = JObject.Parse(jsonData);  
Console.WriteLine(details["responseCode"]);  

Console.ReadLine(); 

关于asp.net - 如何获取 JSON 字符串化数据,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51683000/

相关文章:

c# - C# 中单个按钮有两个操作的弹出消息

javascript - 类型错误 : Cannot read property 'get' of undefined (Node. js)

.net - 使用FFMPEG上传后如何获取音频文件的持续时间

java - 最适合表示 JSON 的 Java 数据结构是什么?

javascript - FullCalendar 日期和时间呈现不正确

c# - 从 ASP.NET 批量打印 PDF

c# - LINQ 查询仅加入最后一个值

python - 当查询结果超过一定数量时,Freebase + GoogleAPI 查询返回错误

java - JSON解析无值

json - Powershell 增量值 0.0.1