title: com.fasterxml.jackson.databind.JsonMappingException: Can not deserialize instance of org.healthinsurance.entity.MdcnData[] out of VALUE_STRING token
body: <blockquote>
    <p>I am trying to consume online API when i got this exception</p>
    
    <p>this sample of JSON</p>
  </blockquote>
  
  <pre><code>&gt; "[{\"mdcnNo\":\"2\",\"grpName\":\"VARIOUS\",\"gnrcName\":\"Acetylcysteine
  &gt; 200 mg/ mL in 10? mL Inj. NMSF Cilol®\",\"trdName\":\"Cilol 200mg/ml
  &gt; Inj.\",\"apprv\":\"لا يحتاج
  &gt; موافقة\",\"gndr\":\"كلاهما\",\"unit\":\"Amp.\",\"ATCcode\":\"V03AB23\",\"ADMR\":\"\",\"dfnDayDos\":\"\",\"inInsurance\":\"1\",\"bnfCopayment\":\"25%\",\"corpCopayment\":\"75%\",\"sts\":\"1\"}]"
  </code></pre>
  
  <blockquote>
    <p>Model Class</p>
  </blockquote>
  
  <p>@JsonIgnoreProperties(ignoreUnknown = true)
      public class MdcnData {</p>
  
  <pre><code>    private String mdcnNo;
      private String grpName;
      private String gnrcName;
      private String trdName;
      private String apprv;
      private String gndr;
      private String unit;
      private String ATCcode;
      private String ADMR;
      private String dfnDayDos;
      private String inInsurance;
      private String bnfCopayment;
      private String corpCopayment;
      private String sts;
     //setter getter toString
  </code></pre>
  
  <blockquote>
    <p>service class</p>
  </blockquote>
  
  <pre><code>public List&lt;MdcnData&gt; getAllMdcnData() {
        return Arrays.stream (restTemplate.getForObject(endPoint,MdcnData[].class))
                .collect(Collectors.toList());
      }
  </code></pre>
  
  <blockquote>
    <p>controller class</p>
  </blockquote>
  
  <pre><code>@GetMapping(value="/get", produces = MediaType.APPLICATION_JSON_VALUE)
      public void run() {
          List&lt;MdcnData&gt; allMdcnData = consumerSrivce.getAllMdcnData();
          for (MdcnData mdcnData : allMdcnData) {
              System.out.println(allMdcnData);
          }
  </code></pre>