JSON output is not compliant with RFC7159
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.
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.
A defect in Pegasystems’ code or rules as API called in OOTB assumes there are no special characters in Clipboard property.
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.
0% found this useful