title: I Cannot deserialize instance of `java.lang.String` out of START_OBJECT token
body: <p>i am trying map a json file to json object but i am getting an error as cannot deserialize string out of start_object token.</p>
  
  <p>This is my json file</p>
  
  <pre><code>{
      "serial_key": 2,
      "serial_identity" : "20200580011000",
      "serial_type" : "I",
      "serial_source" : "NASA"
      "serial_detail" : {
              "serialID": "20200580011000",
              "patient": {
                  "name": {
                      "fullName": "John Mathew",
                      "lastName": "John",
                      "firstName": "Mathew"
                  },
                  "gender": "Female",
                  "century": "0",
                  "dateOfBirth": 252460800000,
                  "admissionStatus": "active"
              }
          }
      }
  </code></pre>
  
  <p>Below is my mapping class</p>
  
  <pre><code>@Data
  @NoArgsConstructor
  @AllArgsConstructor
  public class SerialDto { 
  
      @JsonProperty("serial_key")
      private Long serialKey;
  
      @JsonProperty("serial_identity")
      private String serialIdentity;
  
      @JsonProperty("serial_type")
      private String serialType;
  
      @JsonProperty("serial_source")
      private String serialSource;
  
      @JsonProperty("serial_detail")
      private String serialDetail;
  
  }
  </code></pre>
  
  <p>Below is the code to map it</p>
  
  <pre><code>String json;
          ObjectMapper mapper = new ObjectMapper();
          try {
              json = FileUtils.readFileToString(new File("src/main/resources/test.json"), StandardCharsets.UTF_8);
              SerialDto dto = mapper.readValue(json, SerialDto.class);    
              System.out.println(dto.getSerialIdentity());
          } catch (IOException e) {
              // TODO Auto-generated catch block
              e.printStackTrace();
          }
  </code></pre>
  
  <p>The exception which i am getting is</p>
  
  <pre><code>com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot deserialize instance of `java.lang.String` out of START_OBJECT token
  (through reference chain: com.app.entity.SerialDto["serial_detail"])
  </code></pre>
  
  <p>can anyone help to bind the serial_detail to the string of serialDetail where is there the json format need to be modified in order to get the serial_detail  as json string?</p>