title: spring-boot json root name
body: <p>I'm using spring-boot 1.3.3 and trying to figure out how to have root names on JSON serialization. For example, I would like...</p>
  
  <pre><code>{ stores: [
    {
      id: 1,
      name: "Store1"
    },
    {
      id: 2,
      name: "Store2"
    }]
  }
  </code></pre>
  
  <p>but instead I am getting</p>
  
  <pre><code>[
    {
      id: 1,
      name: "Store1"
    },
    {
      id: 2,
      name: "Store2"
    }
  ]
  </code></pre>
  
  <p>I've been looking at <code>@JsonRootName</code> and customizing the <code>Jackson2ObjectMapperBuilder</code> config but to no avail. In grails, this is pretty simple with Json Views and I was trying also to see how that translated directly to spring-boot but still can't seem to figure it out.</p>
  
  <p>I realize this is similar to <a href="https://stackoverflow.com/questions/16022795/how-to-wrap-a-list-as-top-level-element-in-json-generated-by-jackson">this</a> question but I feel like in the context of Spring (boot) it might be applied differently and would like to know how.</p>