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

2018-04-09  本文已影响0人  小兔哈尼

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

{

"Code":"0005",

"wmsrefundboxdetaillist":

    [ {

        "RefundBox":

            {

                     "Owner":

                   { 

                                       "OwnerCode":"999"

            } 

 } ,

"GoodsType":"0",

"GoodsCode":"2011202011" 

 }]}

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

上一篇 下一篇

猜你喜欢

热点阅读