【发布时间】:2018-02-28 23:23:14
【问题描述】:
我正在制作 Alexa flash 简报技能,需要从我的 URL 返回 json。我的家庭控制器中有以下内容
[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"}
我收到“错误:解析提要时出错。请确保提要是有效的 JSON 或 RSS。”当亚马逊尝试验证来源时。我真的是新手,请帮忙。
【问题讨论】:
-
这是日期格式问题吗?我认为在 Amazon json 中您需要这种格式的日期:
yyyy-MM-dd'T'HH:mm:ss'.0Z'.- 就像这样"updateDate": "2017-04-13T21:15:11.0Z", -
谢谢 JF 先生,我现在就试试,我敢打赌这就是问题所在。
标签: c# json asp.net-mvc alexa