How to verify all field value in nested Json Structure

What is the best practice to verify all the field value in a nested JSON structure:

{
“ticketId”: “string”,
“changeType”: “Change Record”,
“status”: “New”,
“serviceProvider”: “Telia Company”,
“title”: “string”,
“requestType”: “Normal Change”,
“requestCategory”: “Configuration”,
“description”: “string”,
“reason”: “string”,
“priority”: “Critical”,
“requesterName”: “string”,
“sourceName”: “One Workflow”,
“sourceId”: “string”,
“template”: “string”,
“country”: {
“sweden”: true,
“finland”: true,
“denmark”: true,
“norway”: true,
“lithuania”: true,
“estonia”: true,
“teliaCarrier”: true,
“unknown”: true,
“internal”: true
},
“cti”: {
“category”: “Access”,
“type”: “RAN”,
“item”: “SYNC”,
“technology”: “CORE”,
“model”: “string”,
“manufacturer”: “string”
},
“location”: {
“locationID”: “string”,
“locationName”: “string”,
“regionID”: “string”,
“regionName”: “string”,
“latitude”: “51.0577”,
“longitude”: “1.3081”,
“xDegree”: “50° 50’ 34.7676’’ N”,
“yDegree”: “1° 6’ 3.6072’’ W”,
“locationDetails”: “string”
},
“owner”: {
“ownerProfile”: “string”,
“owner”: “string”
},
“assignment”: {
“assignedProfile”: “string”,
“assignee”: “string”,
“lastAcknowledgedBy”: “string”
},
“hold”: {
“onHoldUntilDate”: “2019-09-17T08:22:12.192Z”,
“onHoldUntilReason”: “string”
},
“vendor”: {
“vendorName”: “string”,
“vendorRef”: “string”,
“hoursOfOperation”: “string”,
“onsiteEngineers”: “string”
},
“resolution”: {
“resolvedGroup”: “string”,
“resolvedPerson”: “string”
},
“closure”: {
“reviewDetails”: “string”,
“closureCode”: “Closed Successfully”,
“failureCode”: “string”,
“withdrawnReason”: “string”,
“completedCode”: “string”,
“completionCode”: “string”,
“faultPosition”: “string”,
“resolutionCode”: “string”,
“resolution”: “string”
},
“core”: {
“requestID”: “string”,
“requestGUID”: “string”,
“requestState”: “string”,
“creator”: “string”,
“createDate”: “2019-09-17T08:22:12.192Z”,
“modifiedBy”: “string”,
“modifiedDate”: “2019-09-17T08:22:12.192Z”,
“requestDate”: “2019-09-17T08:22:12.192Z”
},
“timeline”: {
“timelineEntryType”: “Private”,
“timelineTextEntry”: “string”
},
“changeBuilder”: “string”,
“mop”: {
“implementation”: “string”,
“testPlan”: “string”,
“rollback”: “string”,
“communicationPlan”: “string”,
“verificationOfFunctionality”: “string”,
“riskDescription”: “string”
},
“impact”: {
“expectedAlarms”: “string”,
“impactDurationDays”: 0,
“impactDurationHours”: 0,
“impactDurationMinutes”: 0,
“impactDurationSeconds”: 0,
“actualImpact”: “No Impact”
},
“schedule”: {
“requestStart”: “2019-05-24T16:49:50.256Z”,
“requestEnd”: “2019-05-24T16:49:50.256Z”,
“agreedStart”: “2019-05-24T16:49:50.256Z”,
“agreedEnd”: “2019-05-24T16:49:50.256Z”,
“actualStart”: “2019-05-24T16:49:50.256Z”,
“actualEnd”: “2019-05-24T16:49:50.256Z”,
“estimatedStart”: “2019-09-17T08:22:12.192Z”,
“estimatedEnd”: “2019-09-17T08:22:12.192Z”,
“estimatedImpact”: “No Impact”,
“serviceAndCustomerImpact”: “string”
},
“ci”: [
{
“ciName”: “string”,
“impactType”: “Un-Planned”,
“impactCategory”: “Actual”,
“impactDateFrom”: “2019-09-17T08:22:12.192Z”,
“impactName”: “string”,
“serviceAction”: “string”,
“impactDateTo”: “2019-09-17T08:22:12.192Z”,
“interfaceName”: “string”,
“action”: “string”,
“associationType”: “string”,
“primarySecondary”: “string”,
“category”: “string”,
“type”: “string”,
“item”: “string”,
“siteName”: “string”
}
]
}

json schema validation. search the forum for solutions

Hi,

you can play with this
http://ergast.com/api/f1/2017/circuits.json
use GET method

use jsonSlurper class

import groovy.json.JsonOutput
import groovy.json.JsonSlurper

def response = WS.sendRequest(findTestObject('WebServiceReqs/webRequest'))
def responseText = response.getResponseText()

def jsonSlurper = new JsonSlurper()
def object = jsonSlurper.parseText(responseText)
int jsonSize = object.MRData.CircuitTable.Circuits.circuitId.size() //this will get count of circuitId values
//loop circuitId node values
for (int i = 0; i < jsonSize; i++){
	println(object.MRData.CircuitTable.Circuits.circuitId[i])
}