匹配记录的定义:当至少三个字段的值为M00或M01时,一个RecordMatch对象。
如何使用Jayway JsonPath计算RecordMatch对象的数量是否符合匹配记录?我们可以使用Java代码计算它,但需要使用项目中的JsonPath表达式进行计算。
{
"Inquiry": {
"Matches": [
{
"TotalLength": 8,
"TerminatedRecord": [
{
"RecordMatch": {
"Name": "M01",
"AsName": "M02",
"Address": "M01",
"PhoneNumber": "M00",
"AltPhoneNumber": "M00",
"CountrySubdivisionTaxId": "M00",
"NationalId": "M00",
"Country": "M00",
"DBA": "M00",
"PrincipalMatch": [
{
"Name": "M01",
"Address": "M01",
"PhoneNumber": "M01",
"AltPhoneNumber": "M00",
"NationalId": "M01",
"DriversLicense": "M01"
}
]
}
},
{
"RecordMatch": {
"Name": "M01",
"AsName": "M02",
"Address": "M01",
"PhoneNumber": "M00",
"AltPhoneNumber": "M00",
"CountrySubdivisionTaxId": "M00",
"NationalId": "M00",
"Country": "M00",
"DBA": "M00",
"PrincipalMatch": [
{
"Name": "M01",
"Address": "M01",
"PhoneNumber": "M01",
"AltPhoneNumber": "M00",
"NationalId": "M01",
"DriversLicense": "M01"
}
]
}
},
{
"RecordMatch": {
"Name": "M01",
"AsName": "M02",
"Address": "M01",
"PhoneNumber": "M00",
"AltPhoneNumber": "M00",
"CountrySubdivisionTaxId": "M00",
"NationalId": "M00",
"Country": "M00",
"DBA": "M00",
"PrincipalMatch": [
{
"Name": "M01",
"Address": "M01",
"PhoneNumber": "M01",
"AltPhoneNumber": "M00",
"NationalId": "M01",
"DriversLicense": "M01"
}
]
}
}
]
}
]
}
}