【发布时间】:2018-03-24 16:00:33
【问题描述】:
我们在 json 文件中有 2 条记录,我想一一读取并发送到 rest api。 我们可以在列表中获取这些记录,还是可以在单个有效负载中逐一读取此记录。怎么拆分?
{
"batchSize": 0,
"debug": true,
"records": [
{
"firstName": "Maria Farj Hassan",
"address": {
"postcode": "100001",
"longitude": 180
},
"birthDay": "1980-06-30",
"startTime": 1485167477,
"_meta": {
"type": "customer.dedup",
"id": "1",
"status": "ACTIVE",
"businessId": "1",
}
}
]
}
第二条记录是::
{
"batchSize": 0,
"debug": true,
"records": [
{
"firstName": "Maria Hassan",
"address": {
"postcode": "100001",
"longitude": 180
},
"birthDay": "1980-06-30",
"partyType": 1,
"startTime": 1485167477,
"_meta": {
"type": "customer.dedup",
"id": "1",
"status": "ACTIVE"
}
}
]
}
【问题讨论】:
标签: java json gson testng dataprovider