I am doing a project in springboot rest API. My controller class look like below,
@RequestMapping(value = "/artdimfil", method = RequestMethod.POST, consumes = "application/json", produces = "application/json")
@ResponseBody
public boolean saveArticleDimFilter(@RequestBody ArtDimFil artDimFil)
I want to send the below payload in the postman,
{
"id": "b30d1486-04c8-4acc-8d14-8604c81accab",
"docIdentifier": {
"recType": "ABC",
"accesslist": [
{
"userid": "xyz@abc.com",
"role": "abc",
"status": "Active",
"actiondate": "2020-07-03T17:59:34.600+0000",
"name": "XYZ",
}]
}
}
But it is giving the error saying
[org.springframework.http.converter.HttpMessageNotReadableException: JSON parse error: Cannot deserialize instance of `com.ibm.epm.next.model.Accesslist` out of START_ARRAY token; nested exception is com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot deserialize instance of `com.ibm.epm.next.model.Accesslist` out of START_ARRAY token.
Please suggest me what to do.