title: Trying to indent a json dump and then write to a file
body: <p>I had this json dump which is not well indented and not readable when i just write into a file so to make it more readable I did this </p>
  
  <pre><code> with open(responseFile, 'w') as outfile:
        outfile.write(dumps(loads(content), indent=4))
  </code></pre>
  
  <p>but now I get this Invalid \escape: error. Any suggestions ? </p>
  
  <p>e.g. Content:</p>
  
  <pre><code>{"devices":{"device":{"customAssetNumber":"","deviceName":"Shamik\'s iPhone","deviceOwner":"","deviceStatus":"Active","deviceType":"Smartphone","emailAddress":"sray@xyz.com","imeiEsn":342342,"installedDate":"2014-03-04T09:14:58","lastReported":"2014-03-05T06:48:42","DeviceID":"ApplC39GMAR7DTD8","Status":"Enrolled","mailboxDeviceId":"","mailboxLastReported":"","mailboxManaged":"","manufacturer":"Apple","model":"iPhone 4S","osName":"iOS 7","osServicePack":"","ownership":"Not Defined","platformName":"iOS","sourceID":1,"udid":"","unifiedTravelerDeviceId":"","username":"sray","wifiMacAddress":""},"count":1,"pageNumber":1,"pageSize":1}}
  </code></pre>