title: how to generate http response using json in REST web service?
body: <p>I want to response using json in web service like this :</p>
  
  <pre><code>HTTP/1.1 200 OK
  Content-Type: application/vnd.org.snia.cdmi.dataobject+json
  X-CDMI-Specification-Version: 1.0
  {
  "objectURI" : "/MyContainer/MyDataObject.txt",
  "objectID" : "AABwbQAQb/ENV52Ai8a3MA==",
  "parentURI" : "/MyContainer/",
  "mimetype" : "text/plain",
  "metadata" : {
  "cdmi_size" : "17"
  },
  "valuerange" : "0-17",
  "value" : "Hello CDMI World!"
  }
  </code></pre>
  
  <p>But now I can only show like </p>
  
  <pre><code>HTTP/1.1 200 OK
  Content-Type: application/vnd.org.snia.cdmi.dataobject+json
  X-CDMI-Specification-Version: 1.0
  {
  "objectURI" : "/MyContainer/MyDataObject.txt",
  "objectID" : "AABwbQAQb/ENV52Ai8a3MA==",
  "parentURI" : "/MyContainer/",
  }   
  </code></pre>
  
  <p>How to put <code>"meta" : {....}</code> after <code>"mimetype"</code> from above .And how to get the <code>"meta"</code> as <strong>BasicDBObject</strong> or other types?I write web service using jersey framework and java. </p>
  
  <p>thanks</p>