首页 > Web开发 > 详细

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

时间:2020-01-08 23:04:16      阅读:298      评论:0      收藏:0      [点我收藏+]

报错信息:

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

技术分享图片

 

 

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

原文:https://www.cnblogs.com/lengjf/p/12168924.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!