InboundMappingException while formatting returned JSON data
InboundMappingException while formatting the JSON data returned from the Pega API Get Data option. This occurs when the data type references a report definition.
com.pega.pegarules.pub.services.InboundMappingException: Exception occurred while mapping incoming response to .ASReleaseList
Error shown by JSON Validator:
"pyNumberCurrencySymbol": "#DIALOGBODYquot; ,"
Error: Parse error on line 803:
...OGBODYquot; ," pyNumberFormat ":"
Expecting 'EOF', '}', ':', ',', ']', got 'undefined'
Steps to Reproduce
- Create a REST connector which references the out-of-the-box GET Data API
- In the endpoint URL, specify a data type which directly references a report definition
- Create an activity to call the REST connector
- Run the activity and trace
- View the error in the tracer, or if the response is set to clipboard, copy the JSON from the returned field and enter into a JSON validator
The Service returns the JSON representation of a Code-Pega-List object, which is not an Array of objects.
However, the connector is configured for JSON mapping to a Page List property.
ResolutionPerform the following local-change:
Reconfigure the service to send a valid JSON Array of 'PegaProjMgmt-Work-Product-Version' objects, by serializing the pxResults property to JSON rather than the whole Code-Pega-List page.
Alternatively, reconfigure the connector to map to a single Page of type Code-Pega List, and then reconfigure the application logic to consume the pxResults property of this page.