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

报错信息:

{"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请求,传入参数,想当然的以为是{}形式,结果调用的接口是[{}]形式,对接口了解不够。

 

 

posted @ 2020-01-08 21:46  lengjf  阅读(3876)  评论(0编辑  收藏  举报