Skip to Main Content

Integration

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to escape special characters in building a json string

G.RajkumarMar 14 2017 — edited Mar 22 2017

Hello All,

I am facing issues while trying to escape the special characters in building a json string.

Tried searching posts in stackoverflow and in some other blogs, but it did not help.

Using the below java code in OSB12c[Using java callout activity] to escape the special characters in json string but it did not escape the special characters.

StringEscapeUtils.escapeJava(testStr));

For example:

If json string has "What is the strategic category\\ Pillar being supported", after escaping the special characters it should result in \"What is the strategic category\\\\ Pillar being supported\".

Is there any javascript function that helps to escape the special characters?. If so, can you please suggest me.

Thanks in advance.

Regards,

Rajkumar

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 19 2017
Added on Mar 14 2017
3 comments
2,934 views