Posted: 15 Nov 2017 17:55 EST Last activity: 9 Nov 2018 16:09 EST
How to pass Not Allowed characters in Json
I have requirement where user fills up text Area in a form. User can hit enter button to change line, Tab button for spaces, etc on the text Area. We are passing the field values to External Service using Json. Now if user hits Json Not Allowed Special Char viz Backspace, FormFeed, new line, Tab, BackSlash etc throws error that " Cannod decode..... Input String Reader Error". I want to escape these special char. When I use the function @Utilities.encodeURL(PageName.PropertyName) for the field, it works but then it converts all the special characters to different characters for. e.g. all spaces are converted to + sign, all the commas are converted to % etch which we don't want.
I tried to replace \n or \t etc with some text value, but that also didn't help.
Any idea how can this be done.
Share this page
Moderation Team has archived post,
This thread is closed to future replies. Content and links will no longer be updated. If you have the same/similar Question, please write a new Question.
Posted: 4 years ago
Posted: 16 Nov 2017 4:54 EST
Sudhakar Reddy Yaparla (SudhakarReddy)
Principal Technical Solutions Engineer
I have a requirement where I need to pass the special characters and have to use them in the rich text editor. I tried escaping all the special characters ie \\n,\\t,\\r while sending but still it is failing while mapping the service result JSON to the response_Get. I thought the encoding and decoding would solve the issue but seems not working. Could someone please help me.
Thank you for posting your query on PSC. This looks like an inactive post and hence, we suggest you create a new post for your query.
Thank you for posting your query on PSC. This looks like an inactive post and hence, we suggest you create a new post for your query. Click on the Write a Post button that’s at the top of this screen and also on our Pega Support Community homepage. Once created, please reply back here with the URL of the new post.
We have also sent you a private message opening up a communication channel in case you have any further questions.