亚马逊 Alexa 说我的 json 无效,我不知道如何修复它
Amazon Alexa says my json is invalid and I dont know what to do to fix it
我正在制作 Alexa 快速简报技能,需要 return json 来自我的 URL。我的家庭控制器中有以下内容
[HttpGet]
public ActionResult Feed(string id)
{
Helper.TodaysWord help = new Helper.TodaysWord();
return Content(help.jsonBuilder(id), "application/json");
}
前往 URL 得到以下 json。
{"uid":"7a257633-4032-4593-a1be-a354a395aced","updateDate":"2/28/2018 12:00:00 AM","titleText":"Today's Japanese","mainText":"Test, put word and definition here","redirectionUrl":"HTTP://www.LostDutchmanSoftware.com"}
当亚马逊尝试验证来源时,我得到 "Error: There was an error parsing the feed. Please ensure that the feed is valid JSON or RSS."。我真的很陌生,请帮忙。
您的JSON有效。您的问题可能与日期格式有关。
尝试使用非常常见的ISO 8601日期格式。
"updateDate" : "2018-02-28T12:00:00.0Z"
我正在制作 Alexa 快速简报技能,需要 return json 来自我的 URL。我的家庭控制器中有以下内容
[HttpGet]
public ActionResult Feed(string id)
{
Helper.TodaysWord help = new Helper.TodaysWord();
return Content(help.jsonBuilder(id), "application/json");
}
前往 URL 得到以下 json。
{"uid":"7a257633-4032-4593-a1be-a354a395aced","updateDate":"2/28/2018 12:00:00 AM","titleText":"Today's Japanese","mainText":"Test, put word and definition here","redirectionUrl":"HTTP://www.LostDutchmanSoftware.com"}
当亚马逊尝试验证来源时,我得到 "Error: There was an error parsing the feed. Please ensure that the feed is valid JSON or RSS."。我真的很陌生,请帮忙。
您的JSON有效。您的问题可能与日期格式有关。
尝试使用非常常见的ISO 8601日期格式。
"updateDate" : "2018-02-28T12:00:00.0Z"