title: Convert Spring Entity objects to modified JSON Object
body: <p>I am having a few tables in my DB. Employee, Address, Phone_id</p>
  
  <pre><code>Table Employee
  ====================
  ID | Emp_Name | Address_id | Phones_id
  
  Table Address
  ====================
  ID | Block_no | City | State
  
  Table Phone_id
  ====================
  ID | Phone_1 | Phone_2 | Phone_3
  </code></pre>
  
  <p>When I display the JSON received directly from repository, it works, but not in the format expected by UI.
  I wish to make some changes to the received JSON. Basically, transform it and then provide response over REST.</p>
  
  <p>So my questions are:</p>
  
  <ol>
  <li><p>Is there any Spring way to solve my requirement. So that I can just map my entity class to some JSON class.</p></li>
  <li><p>Is there any design pattern that can be used in such a scenario.</p></li>
  </ol>
  
  <p>Thanks a bunch!</p>