Requests库发送post请求,传入接口参数后报JSON parse error

本秂侑毒 提交于 2020-01-08 22:19:11

报错信息:

{"timestamp":"2020-01-08T14:42:40.894+0000","status":400,"error":"Bad Request","message":"JSON parse error: Cannot deserialize instance of `java.util.ArrayList` out of VALUE_STRING token; nested exception is com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot deserialize instance of `java.util.ArrayList` out of VALUE_STRING token\n at [Source: (PushbackInputStream); line: 1, column: 1]","path":"/home/brand/create"}

原因:发送post请求,传入参数,想当然的以为是{}形式,结果调用的接口是[{}]形式,对接口了解不够。

 

 

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!