Replace # with \u0023 in a Java String which looks like below:
{subjectCategory:”s123″, subjectId:”111222333″, content:”test #comment999″, ownerId:”111″, ownerName:”tester”}
String.replace("#","\\u0023");
I’ve tried the above function, but it doesn’t seem to work.
You need to escape the backslash with another backslash:
Test: