Postman passing Josn field error: Cannot deserialize instance of `java.util.ArrayList` out of VALUE_STRING token

Postman passing Josn field error: Cannot deserialize instance of java.util.ArrayList<java.lang.Object> out of VALUE_STRING token

  • problem:

    2021-08-02 10:15:07.816 ERROR 9796 — [nio-8082-exec-6] c.y.c.b.e.GlobalExceptionHandler : /training/add : JSON parse error: Cannot deserialize instance of java.util.ArrayList<java.lang.Object> out of VALUE_STRING token; nested exception is com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot deserialize instance of java.util.ArrayList<java.lang.Object> out of VALUE_STRING token
    at [Source: (PushbackInputStream); line: 9, column: 20] (through reference chain: com.yun.cloud.gap.entity.request.record.EmployeeTrainingRequest[“trainingUrls”])

  • Reason: At this point in the data mapping process, the data types are not compatible so that errors are made when converting to each other. So we just need to change the format to an array “[“value1”, “value2″,…]”, as shown below.

 

Similar Posts:

Leave a Reply

Your email address will not be published. Required fields are marked *