难以使用Newtonsoft.Json

时间:2018-02-09 20:52:33

标签: json parsing

我使用Newtonsoft.Json序列化了一个jason流。 以下是数据的样子:

{
  "id": "55115654340-8d43-440c-8683-c3aa299e39cd",
  "timestamp": "2018-02-09T13:57:34.143Z",
  "lang": "en",
  "result": {
    "source": "agent",
    "resolvedQuery": "HELP",
    "action": "",
    "actionIncomplete": false,
    "parameters": {},
    "contexts": [],
    "metadata": {
      "intentId": "63b7b4a5-3f7f-41b1-81ec-fcc6f70fb173",
      "webhookUsed": "true",
      "webhookForSlotFillingUsed": "false",
      "webhookResponseTime": 5000,
      "intentName": "HELP"
    },
    "fulfillment": {
      "speech": "",
      "messages": [
        {
          "type": 0,
          "speech": ""
        }
      ]
    },
    "score": 1
  },
  "status": {
    "code": 206,
    "errorType": "partial_content",
    "errorDetails": "Webhook call failed. Error: Request timeout.",
    "webhookTimedOut": true
  },
  "sessionId": "f761206e-76d4-4a08-b95d-57a39694cb00"
}


 using
   Dim jsonResulttodict = JsonConvert.DeserializeObject(Of Dictionary(Of 
   String, Object))(decodedString)

我可以通过var_id = jsonResulttodict.Item("id")

获取id值

如何获得更深层的值,例如resolveQuery的值低于结果?

以及在结果....下的元数据下的intentName的值。

谢谢

0 个答案:

没有答案