Close popover
Krishna KK (KrishnaK0235)

KrishnaK0235 Member since 2013 4 posts
Posted: February 15, 2017
Last activity: March 3, 2017

REST JSON Objects Parsing

As part of GSP Project, we are interfacing with one of the REST API and as we were analyzing the various JSON response structures, we found out that at least one of the resource has root element as a JSON array OR an object. Pega parses the JSON root element in response to response_{HTTP_VERB} while we run the wizard as a pyMapTo structure. We anticipate that the dynamic response structure from Service API will create issues.
We need a fix in solving the below issue urgently. Service team always sent root element as json object (or) Is there any other way to handle the dynamic responses from APIs ?

Observations:1. If we run the wizard with the root array json structure, response_GET, will be generated as a page list. This would mean, anytime we get an error response, a type exception will occur while mapping.
2. If we run the wizard with root object structure, mapping success responses will throw type exception (since it’s an array in our case)

***Updated by Moderator: Marissa to add Enhancement ID to post***

Enterprise Application Development Dev/Designer Studio Data Integration Java and Activities