title: Convert bean to flattern the json
body: <p>Request:</p>
  <pre><code>{
     &quot;messageHeader&quot;:{
        &quot;serviceId&quot;:&quot;SPECTRUM_MOBILE&quot;,
        &quot;requestType&quot;:&quot;MNO&quot;,
        &quot;referenceNumber&quot;:&quot;2343422324340239243223&quot;
     },
     &quot;data&quot;:{
        &quot;transactionType&quot;:&quot;GD&quot;,
        &quot;transactionTimeStamp&quot;:&quot;2020-07-13T18:42:37Z&quot;,
        &quot;deviceId&quot;:[
           {
              &quot;type&quot;:&quot;IMEI&quot;,
              &quot;value&quot;:&quot;3371869789537&quot;
           }
        ],
        &quot;simId&quot;:[
           {
              &quot;type&quot;:&quot;ICCID&quot;,
              &quot;value&quot;:&quot;787109194753727&quot;
           }
        ],
        &quot;status&quot;:[
           {
              &quot;type&quot;:&quot;migrationStatus&quot;,
              &quot;value&quot;:&quot;MIGRATED&quot;
           }
        ]
     }
  }
     
  </code></pre>
  <p>Expected Response:</p>
  <pre><code>{
     &quot;serviceId&quot;:&quot;SPECTRUM_MOBILE&quot;,
     &quot;requestType&quot;:&quot;MNO&quot;,
     &quot;referenceNumber&quot;:&quot;2343422324340239243223&quot;,
     &quot;IMEI&quot;:&quot;3371869789537&quot;,
     &quot;ICCID&quot;:&quot;787109194753727&quot;,
     &quot;migrationStatus&quot;:&quot;MIGRATED&quot;
  }
  </code></pre>
  <p>Actual Response:</p>
  <pre><code>flatterJson:::com.excelacom.wearable.bean.FlatterJson@3043fe0e
  </code></pre>
  <p>Pojo class:</p>
  <pre><code>    package com.excelacom.wearable.bean;
      
      import com.fasterxml.jackson.annotation.JsonAlias;
      import com.fasterxml.jackson.annotation.JsonUnwrapped;
      
      import groovy.transform.SelfType;
      import lombok.Getter;
      import lombok.Setter;
      import lombok.ToString;
      
      @Getter
      @Setter
      @ToString
      public class FlatterJson {
      
          @JsonUnwrapped
          private MessageHeader messageHeader;
      
          @JsonUnwrapped
          private Data data;
      }
      
      @Getter
      @Setter
      @ToString
      class MessageHeader {
      
          private String serviceId;
      
          private String requestType;
      
          private String referenceNumber;
      
      }
      
      @Getter
      @Setter
      @ToString
      class Data {
      
          @JsonUnwrapped
          private DeviceId deviceId;
      
          @JsonUnwrapped
          private SimId simId;
      
          @JsonUnwrapped
          private SimId status;
      }
      
      @Getter
      @Setter
      @ToString
      class DeviceId {
      
          @JsonAlias(&quot;IMEI&quot;)
          private String value;
      
      }
      
      @Getter
      @Setter
      @ToString
      class SimId {
      
          @JsonAlias(&quot;ICCID&quot;)
          private String value;
      
      }
      
      @Getter
      @Setter
      @ToString
      class status {
      
          @JsonAlias(&quot;migrationStatus&quot;)
          private String value;
      
      }
  </code></pre>
  <p>Request needs to be set in pojo class and response should be flatten json.</p>