title: ServiceNow - create custom JSON web service
body: <p>I'm developing a mobile app that displays a list of projects, tasks and subtasks. It is important that I can get all the records in one call to SN
  for example:</p>
  
  <pre><code>{"records":[
    {  ....
      "name": "Project One",
      "parent_tasks": [....
        "short_description": "Parent task 1"
        "subtasks": [
           "short_description":"Subtask 1.1"
        ]
      ]
    }
  
  ]}
  </code></pre>
  
  <p>so I decided to build my own web service that will generate a JSON response. As far as I know scripted web services can produce only WSDL, is there any way to get data in JSON format? 
  I also tried to create Database View, but it seems like it is not possible to get all the info I need in one view.</p>
  
  <p>What would be the best approach generate required data in JSON format?</p>