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

 

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM