json断言主要用于请求返回的值为json格式,可以提取json中的值与预期结果进行比对
请求的响应值如下,现在需要断言orderSn的值为5010020190702081850082
{"code":"0","msg":"操作成功","data":{"totalSize":1,"totalPage":1,"pageSize":10,"pageNum":1,"data":[{"orderSn":"5010020190702081850082","sellerName":"Chengdu Import and Export Trade Co., Ltd.","buyerName":"Jamaica Purchasing Company","totalPrice":1000000,"currency":1,"paymentType":5,"paymentAgreement":1,"goodsStatus":1,"errorStatus":0,"createTime":"2019-07-02T00:18:50.000+0000","updateTime":"2019-07-02T00:18:50.000+0000","orderTag":0,"takeoverTime":null,"foreignTime":null,"statusBeforeClose":0}]}}