0

我正在尝试将 JSON 内容保存在答案中。

例如,QnA 对就像

  • 问:维修中心在哪里。
  • 答:{ "text" : "维修中心定位...", "next": "你想知道维修中心的电话吗" }

我的聊天机器人在收到来自 QnA 服务的这种回答时会做一些特定的事情。

dynamic answser = JObject.parse(qnaResponse.answer);
if (answer.next == string.Empty){
   //End conversation
}else{
   await context.PostAsync(answer.next);
}

但是我总是得到乱码的字符串作为响应答案,我无法解析为 JSON 对象并进行其余的对话。

{ "text":" the repair center locates ... " ,"next": "would you like to know the phone number of the repair center" }

是否可以将 JSON 内容存储为答案?还是我错过了什么?

4

0 回答 0