title: Reading and Writing JSON through Python
body: <p>read.json file : </p>
  
  <pre><code>{
      "Username" : "admin",
      "Password" : "admin",
      "Iterations" : 5,
      "Decimal" : 5.5,
      "tags" : ["hello", "bye"],
      "Value" : 5
  }
  </code></pre>
  
  <p>program.py File:</p>
  
  <pre><code>import json 
  with open('read.json') as data_file:
      data = json.load(data_file)
  
  data = str(data)
  data.replace("'",'""',10)
  f = open("write.json", "w")
  f.write(data)
  </code></pre>
  
  <p>write.json file : </p>
  
  <pre><code>{'Username': 'admin', 'Password': 'admin', 'Iterations': 5, 'Decimal': 5.5, 'tags': ["hello", "bye"], 'Value': 5}
  </code></pre>
  
  <p>What I want to achieve : </p>
  
  <ol>
  <li>Read JSON data from read.json File </li>
  <li>Parse and modify some values from the JSON in my program</li>
  <li>Write to another write.json file (In JSON Format)</li>
  </ol>
  
  <p>There are no errors in my code, but the write.json does not contain the values in double quotes(""), it rather as the values wrapped in single quotes making it not a proper JSON format.</p>
  
  <p><strong>What change needs to be done to make the write.json file to contain proper JSON format and also 'pretty-write' to write.json file.</strong></p>