MismatchedInputException: Cannot deserialize instance of `xxx` out of START_ARRAY token

问题

使用postman向端发送请求时,出现
org.springframework.http.converter.HttpMessageNotReadableException: JSON parse error: Cannot deserialize instance of `xxx` out of START_ARRAY token; nested exception is com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot deserialize instance of `xxx` out of START_ARRAY token

原因

postman发送的特定字段为数组,但java object中该属性为对象,故序列化失败

办法

下面方案二选一

  1. 将postman中问题属性改为对象;
  2. 将java object中问题属性该为数组

你可能感兴趣的:(错误收集,json,postman,array,sparse,coding)