jsonobject示例

{
    "head": {
        "errCode": "0",
        "requestType": 11,
        "errMsg": "成功",
        "status": "SUCCESS",
        "timeStamp": ""
    },
    "body": {
        "insResults": {
            "Test201708111045308214756#100000093": {
                "buildTime": "2017-12-04 13:34:17",
                "bxErrCode": 0,
                "bxErrMsg": "",
                "bxNo": [
                    "PJBS20174406Q000A01798"
                ],
                "status": "SUCCESS"
            }
        },
        "timeStamp": "2017-12-04 13:34:17"
    }
}
JObject jObject = JsonConvert.DeserializeObject(postResult) as JObject;

if (jObject["head"]["errCode"].ToString() == "0")
{
    var s = jObject["body"]["insResults"].First.First["bxNo"][0];
    result = "0|" + s;
}

JavaScriptObject 对应到JObject

最后修改:2017 年 12 月 04 日
如果觉得我的文章对你有用,请随意赞赏