title: Replace string containing " with \"?
body: <p>How can I replace string containing <code>"</code> with <code>\"</code> ? </p>
  
  <p><code>replace(""","\"")</code> is not working for me.</p>
  
  <pre><code>public static String replaceSpecialCharsForJson(String str){
      return str.replace("'","\'")
                .replace(":","\\:")
                .replace("\"","\"")
                .replace("\r", "\\r")
                .replace("\n", "\\n");
  } 
  </code></pre>