postman 传递对象,对象中包含list

如题:使用postman时发现传递包含list的属性的对象就会报400错误:json

HTTP Status 400 – Bad Request Type Status Report Description The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).函数

自定义json格式以下:post

{
    "abc" : "12341234",
    "test" : "2342345",
    "url" : "",
    "aaa" : "#b709de",
    "lstMessage" : 
    [
        {
            "name" : "first",
            "value" : "惺惺惜惺惺",
            "color" : "#FF3333"
        }, 
        {
            "name" : "proName",
            "value" : "柔柔弱弱人",
            "color" : "#0044BB"
        }, 
        {
            "name" : "price",
            "value" : "99",
            "color" : "#0044BB"
        }, 
        {
            "name" : "priceTime",
            "value" : "2018年08月17日",
            "color" : "#000"
        }, 
        {
            "name" : "remark",
            "value" : "若有其它问题,请咨询电话:400-8888-888",
            "color" : "#000"
        }
    ]
}url

出现这个错误的缘由除去类型转换的异常,还有一个很是重要,就是须要对象声明出:默认的构造函数 ,这个很是重要!!! list中若是仍是一个对象那么该对象一样须要声明出:默认的构造函数,否则一样报错!!!至此问题终于解决了!!!spa

相关文章
相关标签/搜索