Close popover
Gopinath Srinivasan (GopinathS5784)
To Financial

To Financial
GopinathS5784 Member since 2019 10 posts
To Financial
Posted: June 26, 2020
Last activity: July 6, 2020

PEGA cannot do escaped JSON strings

PEGA cannot do escaped JSON strings.For JSON in a object, we want all the "" ( double quotes) to be preceded by "\" for the destination team to accept it.

For Example, 

right now we are sending the request like to the service end.


  "AbsenceDetail": "{ "prop":"value" }"



but service end , not able to parse this request.


Using duck duck go’s json validator this is what you get:

Error: Parse error on line 2:

...AbsenceDetail": "{ "prop":"value" }"}


Expecting 'EOF', '}', ':', ',', ']', got 'undefined'



They are expecting us to send the request as "AbsenceDetail": "{ \"prop\":\"value\" }".

However, once the double quotes within the string are escaped, the JSON will parse:


  "AbsenceDetail": "{ \"prop\":\"value\" }"



We are passing the complete page information in JSON , to avoid doing the property set of each element.  Is there any way to escape the JSON String? 

***Edited by Moderator: Pallavi to change content type from Discussion to Question***  

Pega Platform 8.2.6 Enterprise Application Development Dev/Designer Studio Financial Services Senior System Architect