【问题标题】:how to read the variables inside a JSON string [duplicate]如何读取 JSON 字符串中的变量 [重复]
【发布时间】:2016-10-24 04:35:21
【问题描述】:

我有如下的json字符串

string json = "{\"ID\":\"hid\",\"Specification\":\"hname\"}";

但我想读取 Id 和 hname 如下 字符串隐藏 = hardwareidTextbox.Text; 字符串 hname = hardwarename_Textbox.Text; 我如何读取 JSON 字符串中的变量值

【问题讨论】:

标签: c# json


【解决方案1】:

尝试使用

JsonConvert.DeserializeObject(json);

【讨论】:

    猜你喜欢
    • 2011-05-25
    • 1970-01-01
    • 2019-11-04
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-07-14
    • 1970-01-01
    相关资源
    最近更新 更多