Support Article
JSON output is not compliant with RFC7159
SA-28828
Summary
JSON output in the REST API call is malformed. Carriage return is not replaced with anything. Thus, JSON output is not complaint with RFC7159.
PRPC core has the fix as below:
Hfix-23009 for Pega 7.1.5 fixed the issue and Pega 7.1.9 should have permanent code change (BUG-208239).
HF documents DSS need to be introduced:
DSS details :
Purpose : json/escapeSpecialCharacters
Owning Ruleset : Pega-IntSvcs
Value : true
Which does not affect output at all as REST service in Pega Marketing does not use this feature in this version.
Error Messages
No errors on PRPC side, just consumer fails to take JSON response from Pega Marketing.
Steps to Reproduce
1. Populate property with multi-line content to make sure the string has special characters (TABs and CRs).
2. Invoke REST Service that replies with that data.
3. Check output in RAW format - special characters are not escaped.
Root Cause
A defect in Pegasystems’ code or rules as API called in OOTB assumes there are no special characters in Clipboard property.
Resolution
Apply HFix-29796.
Used StringUtils.escapeIntoJSONString API to escape special characters, depending upon DSS settings "json/escapeSpecialCharacters", value.
If DSS is not available, by default it is NOT escaping the special characters.
Published August 23, 2017 - Updated December 2, 2021
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.