Deluge Code Formatting

Deluge Code Formatting

When writing context handlers it becomes extremely difficult to read the code because you can't have any line spaces.

Any possibility of improving this?

EG:
Current code works
  1. {
    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

  1. {
  2. context = '{"id":"Room Service",
  3. "timeout":"300",
  4. "params":[
  5.     {
  6.     "name":"room service",
  7.     "question":"Great! Here is a list of options for you to choose from.",
  8.     "suggestions": 
  9.         {"list":[
  10.             {"text":"House Keeping"},{"text":"Maintenance"}
  11.         ]}
  12.     },
  13.     {
  14.     "name":"time","question":"Okay cool. When can I send them over?",
  15.     "suggestions":
  16.         {"list":[
  17.             {"text":"Now"},
  18.             {"text":"In half hour"}
  19.         ]}
  20.     }]
  21. }'.toMap();
  22. response.put("context",context);
  23. }