data:{ produceBzLzkAdd: this.data.allList } 报错 Cannot deserialize instance of `java.util.ArrayList` out of START_OBJECT token; nested exception is com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot deserialize instance of `java.util.ArrayList` out of START_OBJECT token↵ at [Source: (PushbackInputStream); line: 1, column: 1]"
header: { 'Content-type': 'application/json' } wx.request添加上面的header,参数一项直接填你的对象数组就OK了
java的话用List<Object>接收吧,Object根据定义的对象来就可以了
wx.request({
method: 'POST',
url: 'http:xxxx.xxx',
data: [
{
a: '1',
b: '2'
},
{
a: '1',
b: '2'
}
],
header: {
'Content-type': 'application/json'
},
success(res) {
//
},
fail(err) {
//
}
});
直接在wx.request的data里写上就行了吧?
produceBzLzkAdd: this.data.allList
}
报错
Cannot deserialize instance of `java.util.ArrayList` out of START_OBJECT token; nested exception is com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot deserialize instance of `java.util.ArrayList` out of START_OBJECT token↵ at [Source: (PushbackInputStream); line: 1, column: 1]"