Any possibility of improving this?
EG:
Current code works
- {
context = '{"id":"Room Service","timeout":"300","params":[{"name":"room service","question":"Great! Here is a list of options for you to choose from.","suggestions": {"list":[{"text":"House Keeping"},{"text":"Maintenance"}]}},{"name":"time","question":"Okay cool. When can I send them over?","suggestions":{"list":[{"text":"Now"},{"text":"In half hour"}]}}]}'.toMap();
response.put("context",context);
}
Formatting code per below throws an error
- {
- context = '{"id":"Room Service",
- "timeout":"300",
- "params":[
- {
- "name":"room service",
- "question":"Great! Here is a list of options for you to choose from.",
- "suggestions":
- {"list":[
- {"text":"House Keeping"},{"text":"Maintenance"}
- ]}
- },
- {
- "name":"time","question":"Okay cool. When can I send them over?",
- "suggestions":
- {"list":[
- {"text":"Now"},
- {"text":"In half hour"}
- ]}
- }]
- }'.toMap();
- response.put("context",context);
- }