title: Return JSONArray instead of JSONObject, Jersey JAX-RS
body: <p>I am using <strong>Jersey</strong> to make some of my services RESTful.</p>
  
  <p>My REST service call returns me </p>
  
  <pre><code>{"param1":"value1", "param2":"value2",...."paramN":"valueN"}
  </code></pre>
  
  <p>But, I want it to return </p>
  
  <pre><code>["param1":"value1", "param2":"value2",...."paramN":"valueN"]
  </code></pre>
  
  <p>What are the changes I need to make in the code below? </p>
  
  <pre><code>@GET
  @Produces(MediaType.APPLICATION_JSON)
  public List&lt;com.abc.def.rest.model.SimplePojo&gt; getSomeList() {
      /* 
              Do something
      */
      return listOfPojos;
  }
  </code></pre>
  
  <p>Part of my <strong>web.xml</strong> file looks like this </p>
  
  <pre><code>    &lt;servlet&gt;
          &lt;servlet-name&gt;Abc Jersey REST Service&lt;/servlet-name&gt;
          &lt;servlet-class&gt;com.sun.jersey.spi.container.servlet.ServletContainer&lt;/servlet-class&gt;
          &lt;init-param&gt;
              &lt;param-name&gt;com.sun.jersey.config.property.packages&lt;/param-name&gt;
              &lt;param-value&gt;com.abc.def.rest&lt;/param-value&gt;
          &lt;/init-param&gt;
          &lt;load-on-startup&gt;0&lt;/load-on-startup&gt;
      &lt;/servlet&gt;
  </code></pre>
  
  <p>Thanks!</p>