title: json data for Ext4 store which requires a root element using SPRING MVC
body: <p>i have an issue that i would like to solve. It is relative to get jsonData from an application which use Spring MVC. The reader would be a Ext4 store.</p>
  
  <p>My service returns a json with this appearance:</p>
  
  <pre><code>[
      {
          "username":"john12",
          "password":"john12",
          "lastName":"john12",
      },
      {
          "username":"damian10",
          "password":"damian10",
          "lastName":"damian10",
      }
  ]
  </code></pre>
  
  <p>But i need something like this:</p>
  
  <pre><code>items: [
      {
          "username":"john12",
          "password":"john12",
          "lastName":"john12",
      },
      {
          "username":"damian10",
          "password":"damian10",
          "lastName":"damian10",
      }
  ]
  </code></pre>
  
  <p>My first question is if these characters [ ] are correct or it is neccesary to use only { }
  for example:</p>
  
  <pre><code>items: {
      {
          "username":"john12",
          "password":"john12",
          "lastName":"john12",
      },
      {
          "username":"damian10",
          "password":"damian10",
          "lastName":"damian10",
      }
  }
  </code></pre>
  
  <p>So i have to include the root to the list of users. Some code:</p>
  
  <p>My Spring controller:</p>
  
  <pre><code>@RequestMapping(method=RequestMethod.GET, value="/getUsers")
  public @ResponseBody List&lt;User&gt; getUsersInJSON(){
      return userService.getUsers();
  }
  </code></pre>
  
  <p>My conversion bean in aplicationContext.xml</p>
  
  <pre><code>&lt;bean id="jacksonMessageConverter" class="org.springframework.http.converter.json.MappingJacksonHttpMessageConverter"&gt;&lt;/bean&gt;
  &lt;bean class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter"&gt;
      &lt;property name="messageConverters"&gt;
          &lt;list&gt;
          &lt;ref bean="jacksonMessageConverter"/&gt;
          &lt;/list&gt;
      &lt;/property&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p>I read several post about roots and spring mvc with json but i haven't come to a conclusion. Could somebody explain me an easy solution for this?</p>
  
  <p>Thank you</p>