title: Python json.loads ValueError, expecting delimiter
body: <p>I am extracting a postgres table as json. The output file contains lines like:</p>
  
  <pre><code>{"data": {"test": 1, "hello": "I have \" !"}, "id": 4}
  </code></pre>
  
  <p>Now I need to load them in my python code using <code>json.loads</code>, but I get this error:</p>
  
  <pre><code>Traceback (most recent call last):
    File "test.py", line 33, in &lt;module&gt;
      print json.loads('''{"id": 4, "data": {"test": 1, "hello": "I have \" !"}}''')
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/__init__.py", line 338, in loads
      return _default_decoder.decode(s)
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 365, in decode
      obj, end = self.raw_decode(s, idx=_w(s, 0).end())
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 381, in raw_decode
      obj, end = self.scan_once(s, idx)
  ValueError: Expecting , delimiter: line 1 column 50 (char 49)
  </code></pre>
  
  <p>I figured out the fix is to add another <code>\</code> to <code>\"</code>. So, if I pass</p>
  
  <pre><code>{"data": {"test": 1, "hello": "I have \\" !"}, "id": 4}
  </code></pre>
  
  <p>to <code>json.loads</code>, I get this:</p>
  
  <pre><code>{u'data': {u'test': 1, u'hello': u'I have " !'}, u'id': 4}
  </code></pre>
  
  <p>Is there a way to do this without adding the extra <code>\</code>? Like passing a parameter to <code>json.loads</code> or something?</p>