15 + years Solutions-oriented Integration Interface Specialist with notable success directing a broad range of corporate IT initiatives while participating in planning and implementation of Integrated solutions in direct support of business objectives. Specialties: Design/Development of MS and Oracle SQL Databases, HL7 Ancillary Solutions, and Intersystem Ensemble Solutions. Integrating it all together to create a more robust environment.
While working with Intersystems Ensemble and now IRIS, I have greatly expanded my knowledge of Ensemble and Cache Object Script by asking questions and watching the Developer Community. I tend to ask questions, then figure out the answers on my own or with a little help from others.
Before Intersystems Ensemble, I spent many years as an eGate developer. Specializing in DART, JDBC, and other out of the normal odds and ends.
Typically, it would only be one message schema, but I understand what you mean by creating a copy of the EnsLib.HL7.Operation.TCPOperation. I'll keep that in mind if I want to explore this further.
How do we take the JSON response, iterate through it to put it into a data class structure that could be used? Using JSON2Persistent, I took a JSON response and converted it into a Data Class Structure.










If the Response you get from a REST call is a %DynamicAbstractObject, how do you know how many levels to go through?
I tried using JSON2Persistant however the naming convention of the tree that it is building it too long for me to upload it into github, so since I have two values that I need to only retrieve I am attempting to iterate through the JSON and just extract those two values
for example, if I only want to pull the pureId and the portalURL from the response object, how can I iterate through the JSON response to get those values only?
{ "count": 0, "pageInformation": { "offset": 0, "size": 0 }, "items": [ { "pureId": 0, "uuid": "196ab1c9-6e60-4000-88cb-4b1795761180", "createdBy": "string", "createdDate": "1970-01-01T00:00:00.000Z", "modifiedBy": "string", "modifiedDate": "1970-01-01T00:00:00.000Z", "portalUrl": "string", "prettyUrlIdentifiers": [ "string" ], "previousUuids": [ "string" ], "version": "string", "startDateAsResearcher": "1970-01-01", "affiliationNote": "string", "dateOfBirth": "1970-01-01", "employeeStartDate": "1970-01-01", "employeeEndDate": "1970-01-01", "externalPositions": [ { "pureId": 0, "appointment": { "uri": "string", "term": { "en_GB": "Some text" } }, "appointmentString": { "en_GB": "Some text" }, "period": { "startDate": { "year": 0, "month": 1, "day": 1 }, "endDate": { "year": 0, "month": 1, "day": 1 } }, "externalOrganization": { "uuid": "196ab1c9-6e60-4000-8b89-29269178a480", "systemName": "string" } } ],
when I attempted
set itr = responseData.%GetIterator() while itr.%GetNext(.key, .value) { if key = "pureID"{ set pResponse.pureID = value } elseif key = "portalURL" { set pResponse.portalURL = value } }
both the pureID and portalURL came back blank.