title: System.JSONException: Unexpected character ('i' (code 105)): was expecting comma to separate OBJECT entries at [line:1, column:18]
body: <p>#SalesforceChallenge</p>
  <p>I'm trying to escape a string but I had no success so far.</p>
  <p>This is the response body I'm getting:</p>
  <pre><code>{&quot;text&quot;:&quot;this \&quot;is something\&quot; I wrote&quot;}
  </code></pre>
  <p>Please note that there are 2 backslashes to escape the double quotes char. (This is a sample. Actually I have a big to escape with lots of &quot;text&quot; elements.)
  When I try to deserialize it I get the following error:</p>
  <pre><code>System.JSONException: Unexpected character ('i' (code 105)): was expecting comma to separate OBJECT entries at [line:1, column:18]
  </code></pre>
  <p>I've tried to escape by using:</p>
  <pre><code>String my = '{&quot;text&quot;:&quot;this \&quot;is something\&quot; I wrote&quot;}';
  System.debug('test 0: ' + my);
  System.debug('test 1: ' + my.replace('\&quot;', '-'));
  System.debug('test 2: ' + my.replace('\\&quot;', '-'));
  System.debug('test 3: ' + my.replace('\\\&quot;', '-'));
  System.debug('test 4: ' + my.replace('\\\\&quot;', '-'));
  </code></pre>
  <p>--- Results:</p>
  <pre><code>[22]|DEBUG|test 0: {&quot;text&quot;:&quot;this &quot;is something&quot; I wrote&quot;}
  [23]|DEBUG|test 1: {-text-:-this -is something- I wrote-}
  [23]|DEBUG|test 1: {-text-:-this -is something- I wrote-}
  [24]|DEBUG|test 2: {&quot;text&quot;:&quot;this &quot;is something&quot; I wrote&quot;}
  [25]|DEBUG|test 3: {&quot;text&quot;:&quot;this &quot;is something&quot; I wrote&quot;}
  [26]|DEBUG|test 4: {&quot;text&quot;:&quot;this &quot;is something&quot; I wrote&quot;}
  </code></pre>
  <p>--- What I need as result:</p>
  <pre><code>{&quot;text&quot;:&quot;this -is something- I wrote&quot;}
  </code></pre>
  <p>Please, does someone has any fix to share?</p>
  <p>Thanks a lot.</p>