获取小程序版本列表信息序列化错误
zerov1219 opened this issue · 4 comments
com.github.yydzxz.open.api.v1.response.code.CodeVersionsResponse.data.latest.screenshot字段在多张应用截图时接口返回的是List,出现序列化错误。
错误信息如下:
Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is java.lang.RuntimeException: org.springframework.web.client.RestClientException: Error while extracting response for type [class com.github.yydzxz.open.api.v1.response.code.CodeVersionsResponse] and content type [application/json;charset=utf-8]; nested exception is org.springframework.http.converter.HttpMessageNotReadableException: JSON parse error: Cannot deserialize instance of java.lang.String
out of START_ARRAY token; nested exception is com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot deserialize instance of java.lang.String
out of START_ARRAY token
at [Source: (PushbackInputStream); line: 1, column: 1871] (through reference chain: com.github.yydzxz.open.api.v1.response.code.CodeVersionsResponse["data"]->com.github.yydzxz.open.api.v1.response.code.CodeVersionsResponse$DataObj["latest"]->com.github.yydzxz.open.api.v1.response.code.CodeVersionsResponse$Latest["screenshot"])] with root cause
感谢反馈, 在4.0.5版本已经兼容String
和List<String>
两种情况, 可以通过parseScreenshot()
方法获取screenshot
字段的值