title: How to transform an object into the following json format using Jackson
body: <p>I'm trying to create a json object in this particular format below using via a GET to a  Spring MVC controller. I have this working for a fairly simply class that produces an array which is flat - but not sure which fields I need on the Polydata class to produce the below Json - any tips appreciated.</p>
  
  <pre><code>ResponseEntity&lt;Polydata[]&gt; entity = new ResponseEntity&lt;Polydata[]&gt;(array, headers, HttpStatus.CREATED);
  return entity;
  </code></pre>
  
  <p>Json format I would like to produce</p>
  
  <pre><code>var shapes = [{
  "type": "Feature",
  "properties": {"category": "ABC"},
  "geometry": {
      "type": "Polygon",
      "coordinates": [[
          [-104.05, 48.99],
          [-97.22,  48.98],
          [-96.58,  45.94],
          [-104.03, 45.94],
          [-104.05, 48.99]
      ]]
  }
  }, {
  "type": "Feature",
  "properties": {"category": "DEF"},
  "geometry": {
      "type": "Polygon",
      "coordinates": [[
          [-109.05, 41.00],
          [-102.06, 40.99],
          [-102.03, 36.99],
          [-109.04, 36.99],
          [-109.05, 41.00]
      ]]
  }
  }];
  </code></pre>