I have always struggled with Iterating through a JSON response to pull out certain fields into a Data Class Structure to use to populate fields in a DTL. So I defined the whole structure for the following JSON, with the base structure extending Ens.Response, %XML.Adaptor, and %JSON.Adaptor.
{
"status": {
"message": "success",
"code": 200
},
"data": {
"client": "xxxxxxxxxxxxxxxxxxxxxxxx",
"entities": [
{
"id": "xxxxxxxxxxxxxxxxxx`",
"name": "xxxxxxxxxxxxxxxxx",
"totalCommentCount": 272,
"totalRatingCount": 396,
"totalSurveyCount": 396,
"overallRating": {
"name": "Overall Satisfaction",
"value": 4.9,
"categoryResponseCount": 396,
"questionRatings": [
{
"name": "Provider listen carefully to you",
"value": 5.0,
"responseCount": 395
},
{
"name": "Provider expl in way you understand",
"value": 5.0,
"responseCount": 396
},
{
"name": "Talk with provider re prob/concern",
"value": 4.5,
"responseCount": 394
},
{
"name": "Know important info medical history",
"value": 4.9,
"responseCount": 393
},
{
"name": "Give easy to understand instruction",
"value": 4.9,
"responseCount": 347
},
{
"name": "Spend enough time with you",
"value": 4.9,
"responseCount": 395
},
{
"name": "Show respect for what you say",
"value": 5.0,
"responseCount": 395
}
]
},
"comments": [],
"PGSealOfIntegrity": {
"dataIntegrity": {
"horizontal": {
"darkBackground": {
"png": "xxxxxx"
},
"lightBackground": {
"jpg": "xxxxxxxxxxxxxxxxx",
"png": "xxxxxxxxxxxxxxxx"
},
"darkBackgroundHighResolution": {
"png": "xxxxxxxxxxxxxx"
}
},
"stacked": {
"darkBackground": {
"png": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"x
},
"lightBackground": {
"jpg": "xxxxxxxxxxxxxxxxx",
"png": "XXXXXXXXXXXXXXX"
}
}
},
"sealOfIntegrity": {
"darkBackground": {
"jpg": "XXXXXXXXXXXXXXXXXXXXXXXX",
"png": "XXXXXXXXXXXXXXXXXXXXXXXX"
},
"lightBackground": {
"jpg": "XXXXXXXXXXXXXXXXXXXXXXXXXX",
"png": "XXXXXXXXXXXXXXXXXXXXXXXXXX"
}
}
},
"totalPages": 14,
"ratings": []
}
],
"filter": {
"minThreshold": 0.0,
"minRatingCount": 30,
"minSurveyCount": 0,
"minWordCount": 0,
"days": 365,
"page": 1,
"perPage": 20,
"showComments": false,
"showRatings": true,
"configVersion": "v2",
"period": {
"to": "2026-02-05T23:59:59Z",
"from": "2025-02-05T00:00:00Z"
}
}
}
}
The rest of the structure that is referenced by the base Response.cls structure extends %RegisteredObject, %JSON.Adaptor.
I am able to make the REST call, and the Response is populating into the Response.cls, however within the Trace Viewer the Response is blank. I know the data is there because when I send it to a DTL, I can pull the data elements out.
How do I make the Response show up within the Trace Viewer, or how would I go about extracting the values in RED below
"id": "xxxxxx",
"name": "xxxxxx",
"totalCommentCount": 272,
"totalRatingCount": 396,
"totalSurveyCount": 396,
"overallRating": {
"name": "Overall Satisfaction",
"value": 4.9,