美文网首页
用Json传递 实体类包含实体类的list

用Json传递 实体类包含实体类的list

作者: 小兔哈尼 | 来源:发表于2018-04-09 10:44 被阅读0次

更正:List类的需要加[],实体类直接{}

{

"Code":"0005",

"wmsrefundboxdetaillist":

    [ {

        "RefundBox":

            {

                     "Owner":

                   { 

                                       "OwnerCode":"999"

            } 

 } ,

"GoodsType":"0",

"GoodsCode":"2011202011" 

 }]}

其中"OwnerCode":"999"为rbd→RefundBox→Owner→OwnerCode,之前一直传不进去是因为RefundBox/Owner这两个实体类也加了[],这个[]只要最外边的那个list加就可以了,因为参数中只有这个list,其他的都是被包含的,如下图

相关文章

网友评论

      本文标题:用Json传递 实体类包含实体类的list

      本文链接:https://www.haomeiwen.com/subject/ndibhftx.html