title: MapStruct: How to map property from "java.lang.Object to "java.lang.String"
body: <p>New to MapStrut; Object to String Error:</p>
  
  <blockquote>
    <p>[ERROR] /util/LicenseMapper.java:[11,23] Can't map property "java.lang.Object license.customFields[].value" to "java.lang.String license.customFields[].value". Consider to declare/implement a mapping method: "java.lang.String map(java.lang.Object value)".</p>
  </blockquote>
  
  <p>Code:</p>
  
  <pre><code>@Mapper
  public interface LicenseMapper {
      List&lt;License&gt; jsonToDao(List&lt;com.integrator.vo.license.License&gt; source);
  }
  </code></pre>
  
  <p>The vo.license contains List of CustomFields having property as</p>
  
  <pre><code>@SerializedName("Value")
  @Expose
  private Object value;
  </code></pre>
  
  <p>The Json has input for one field as object as it might come boolean or string or anything so i have mapped it into object. Whereas in dao layer has same field in String. (In custom mapper i just String.valueof but not sure how to achieve it using Mapstrut) </p>
  
  <p>Can anyone tell me what settings are required in LicenseMapper to convert Object to String?</p>
  
  <p>License Structure - Source and destination:</p>
  
  <pre><code>.
  .
  private String notes;
  private Boolean isIncomplete;
  private List&lt;CustomField&gt; customFields = null;
  private List&lt;Allocation&gt; allocations = null;
  </code></pre>
  
  <p>Custom Field Structure in Source (removed gson annotations):</p>
  
  <pre><code>.
  .
  private String name;
  private Object dataType;
  private Object value;
  </code></pre>
  
  <hr>
  
  <p>Custom FIeld Structure in Destination</p>
  
  <pre><code>private String name;
  private String datatype;
  private String value;
  </code></pre>