{ "match": true, "comment": "top level array matches", "expected": { "headers": {"Content-Type": "application/json"}, "body" : { "contentType": "application/json", "encoded": false, "content": [ { "dob": "06/11/2015", "name": "Rogger the Dogger", "id": 3380634027, "timestamp": "2015-06-11T13:17:29" }, { "dob": "06/11/2015", "name": "Cat in the Hat", "id": 1284270029, "timestamp": "2015-06-11T13:17:29" } ] }, "matchingRules" : { "body": { "$[0].id": { "matchers": [ { "match": "type" } ] }, "$[1].id": { "matchers": [ { "match": "type" } ] }, "$[0].name": { "matchers": [ { "match": "type" } ] }, "$[1].name": { "matchers": [ { "match": "type" } ] }, "$[1].dob": { "matchers": [ { "match": "regex", "regex": "\\d{2}/\\d{2}/\\d{4}" } ] }, "$[1].timestamp": { "matchers": [ { "match": "regex", "regex": "\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}" } ] }, "$[0].timestamp": { "matchers": [ { "match": "regex", "regex": "\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}" } ] }, "$[0].dob": { "matchers": [ { "match": "regex", "regex": "\\d{2}/\\d{2}/\\d{4}" } ] } } } }, "actual": { "headers": {"Content-Type": "application/json"}, "body": { "contentType": "application/json", "encoded": false, "content": [ { "dob": "11/06/2015", "name": "Bob The Builder", "id": 1234567890, "timestamp": "2000-06-10T20:41:37" }, { "dob": "12/10/2000", "name": "Slinky Malinky", "id": 6677889900, "timestamp": "2015-06-10T22:98:78" } ] } } }