escaping special characters in java

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Jeyaprakash S
    New Member
    • Nov 2011
    • 1

    escaping special characters in java

    I'm developing a web application in which i get a string from a JSON object , **now what i need is to escape the special characters in that string**, can anyone kindly help me how to acheive this?

    JSONObject rslt= new JSONObject(buf. toString());
    if(rslt!=null) {
    String str=rslt.getStr ing("pc");

    "pc" is the node where the string lies
Working...