Support Article
Error when response body in pyConnect-REST starts with "["
SA-79356
Summary
Error occurs when the response body in the pyConnect-REST connector starts and ends with "[" and "]" respectively.
Error Messages
** Error mapping incoming response to .response_GET: org.codehaus.jackson.map.JsonMappingException: Can not deserialize instance of java.util.LinkedHashMap out of START_ARRAY token at [Source: java.io.StringReader@12ffc1f0; line: 1, column: 1]
Steps to Reproduce
Connect to an external system which sends a JSON file starting with [.
Root Cause
Pega uses third party Jackson APIs libraries to parse JSON files. The library accepts only an object, however, in this case, an array is sent.
Resolution
Perform one of the following local-changes:- Change the JSON at the source level (external system)
- Capture the raw response string into a Text property mapped to the clipboard and then use the parsing logic to extract the required text into the corresponding clipboard properties.
Published August 15, 2019 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.