Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

Connect-REST JSON is "invalid" if the data has a backslash.

SA-29543

Summary



JSON Request generated is corrupt if the inputs has a backslash. This evaluation is being determined at the service end and exception is being sent back to Pega. 

The user has Connect-REST rules to send information to different systems in their application. They found that when their inputs to the Connect-REST have a backslash (\) in any of the properties, the service system is throwing an error saying that the data is corrupted. If they remove the backslash and run the Connect-REST, it is working fine.


Error Messages

Not applicable.


Steps to Reproduce



Generate outbound Connect-REST message with '\' character in the JSON body.

Root Cause



As per JSON specification, not all the special symbols causes invalid JSON. The symbols that need to be escaped are ", \, /, backspace, formfeed, newline, carriage return, horizontal tab, hexadecimal digits. If the user is utilizing Pega "mapTo" as JSON and "mapTo Key": as page property, then they can take advantage of Pega DSS to escape these characters in outgoing JSON.

Resolution



The user was provided the following PDN article that details a hotfix for 7.1.7. The feature was fully introduced in 7.1.9.

https://pdn.pega.com/support-articles/invalid-json-error-rest-integration-rule

Additional screenshots provided for reference.

 

Published October 27, 2016 - Updated October 8, 2020

Was this useful?

0% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us