title: Why JSON can not be read if written with indentation in PYTHON 3.8
body: <p>With indentation:</p>
  <pre><code>a_dict = ({&quot;name&quot;: &quot;kevin&quot;, &quot;id&quot;:100001 })
  with open('test.json',&quot;a+&quot;) as f:
      json.dump(a_dict, f, indent=4) # Indent makes it more readable
      f.write(&quot;\n&quot;)
  print(&quot;done&quot;)
  </code></pre>
  <p>Output as below, won't be able to read, says json.decoder.JSONDecodeError: Expecting property name enclosed in double quotes:</p>
  <pre><code>{
      &quot;name&quot;: &quot;kevin&quot;,
      &quot;id&quot;: 100001
  }
  {
      &quot;name&quot;: &quot;kevin&quot;,
      &quot;id&quot;: 100001
  }
  </code></pre>
  <p>Without indentation:</p>
  <pre><code>a_dict = ({&quot;name&quot;: &quot;kevin&quot;, &quot;id&quot;:100001 })
  with open('test.json',&quot;a+&quot;) as f:
      json.dump(a_dict, f) # Indent makes it more readable
      f.write(&quot;\n&quot;)
  print(&quot;done&quot;)
  </code></pre>
  <p>Output that can be read:</p>
  <pre><code>{&quot;name&quot;: &quot;kevin&quot;, &quot;id&quot;: 100001}
  {&quot;name&quot;: &quot;kevin&quot;, &quot;id&quot;: 100001}
  {&quot;name&quot;: &quot;kevin&quot;, &quot;id&quot;: 100001}
  {&quot;name&quot;: &quot;kevin&quot;, &quot;id&quot;: 100001}
  </code></pre>
  <p>Decoding:</p>
  <pre><code>p_list = []
  with open('test.json') as f:
      for json_obj in f:
          test_dict = json.loads(json_obj)
          p_list.append(test_dict)
          # print(test_dict)
  for emp in p_list:
      print(emp['name'])
  </code></pre>