title: Including Morphia for JSON-to-object mapping with JAX-RS+Jersey
body: <p>I'm setting up a REST route with JAX-RS+Jersey that consumes a JSON object.  This JSON object is special because one of the fields it contains is associated with a Morphia entity.  Is there a way to integrate Morphia's object-mapping with Jackson so that I can deserialize my object?</p>
  
  <p>Example:</p>
  
  <p><strong>Incoming JSON object in request body:</strong></p>
  
  <pre><code>{
      operation: "CREATE",
      document: {  // This object is a Morphia entity
          "name": "Bob"
          "age": 18
      }
  }
  </code></pre>
  
  <p>should be mapped to</p>
  
  <p><strong>POJO</strong>:</p>
  
  <pre><code>public class JSONContainer {
      String operation;
      Document document; // This object is a Morphia entity
  }
  </code></pre>