How to send JSON response to AWS Alexa skill from JAVA



JSONObject outputSpeechContent = new JSONObject();
outputSpeechContent.put("type", "PlainText");
outputSpeechContent.put("text", engineResponse.getText());
JSONObject outputSpeech = new JSONObject();
outputSpeech.put("outputSpeech", outputSpeechContent);

JSONObject resObj = new JSONObject();
resObj.put("version", "1.01");
resObj.put("response", outputSpeech);
response.setStatusCode(200);

Enter fullscreen mode Exit fullscreen mode

原文链接:How to send JSON response to AWS Alexa skill from JAVA

© 版权声明
THE END
喜欢就支持一下吧
点赞8 分享
评论 抢沙发

请登录后发表评论

    暂无评论内容