title: JSON dumps format Python
body: <p>I am reading a JSON file, adding a field and then writing to a new JSON file.</p>
  <p>The JSON file I read in <code>links.json</code> looks like this:</p>
  <pre><code>[{&quot;negativeNode&quot;:&quot;osgb4000000023183407&quot;,&quot;toid&quot;:&quot;osgb4000000023296573&quot;,&quot;term&quot;:&quot;Private Road - Restricted Access&quot;,&quot;polyline&quot;:[492019.481,156567.076,492028,156567,492041.667,156570.536,492063.65,156578.067,492126.5,156602],&quot;positiveNode&quot;:&quot;osgb4000000023183409&quot;,&quot;index&quot;:1,&quot;nature&quot;:&quot;Single Carriageway&quot;}
  ,{&quot;negativeNode&quot;:&quot;osgb4000000023763485&quot;,&quot;toid&quot;:&quot;osgb4000000023296574&quot;,&quot;term&quot;:&quot;Private Road - Restricted Access&quot;,&quot;polyline&quot;:[492144.493,156762.059,492149.35,156750,492195.75,156630],&quot;positiveNode&quot;:&quot;osgb4000000023183408&quot;,&quot;index&quot;:2,&quot;nature&quot;:&quot;Single Carriageway&quot;}
  ,{&quot;negativeNode&quot;:&quot;osgb4000000023183650&quot;,&quot;toid&quot;:&quot;osgb4000000023296638&quot;,&quot;term&quot;:&quot;Private Road - Restricted Access&quot;,&quot;polyline&quot;:[492835.25,156873.5,493000,156923,493018.061,156927.938],&quot;positiveNode&quot;:&quot;osgb4000000023183652&quot;,&quot;index&quot;:3,&quot;nature&quot;:&quot;Single Carriageway&quot;}
  ,{&quot;negativeNode&quot;:&quot;osgb4000000023181163&quot;,&quot;toid&quot;:&quot;osgb4000000023388466&quot;,&quot;term&quot;:&quot;Local Street&quot;,&quot;polyline&quot;:[498136.506,149148.313,498123.784,149143.969,498119.223,149143.411,498116.43,149143.318,498113.638,149145.179],&quot;positiveNode&quot;:&quot;osgb4000000023806248&quot;,&quot;index&quot;:4,&quot;nature&quot;:&quot;Single Carriageway&quot;}
  ]
  </code></pre>
  <p>I open the JSON file, read it, create a new field and then dump it in a new file:</p>
  <pre><code>import json
  links_file = open('links.json')
  links = json.load(links_file)
  
  for link in links:
      link['length'] = 10
  
  with open('links_new.json','w') as outfile:
      json.dump(links, outfile)
  </code></pre>
  <p>This successfully exports and I am able to inspect with a text editor (<a href="https://en.wikipedia.org/wiki/Sublime_Text" rel="noreferrer">Sublime Text</a>):</p>
  <pre><code>[{&quot;index&quot;: 1, &quot;term&quot;: &quot;Private Road - Restricted Access&quot;, &quot;nature&quot;: &quot;Single Carriageway&quot;, &quot;negativeNode&quot;: &quot;osgb4000000023183407&quot;, &quot;toid&quot;: &quot;osgb4000000023296573&quot;, &quot;length&quot;: 10, &quot;polyline&quot;: [492019.481, 156567.076, 492028, 156567, 492041.667, 156570.536, 492063.65, 156578.067, 492126.5, 156602], &quot;positiveNode&quot;: &quot;osgb4000000023183409&quot;}, {&quot;index&quot;: 2, &quot;term&quot;: &quot;Private Road - Restricted Access&quot;, &quot;nature&quot;: &quot;Single Carriageway&quot;, &quot;negativeNode&quot;: &quot;osgb4000000023763485&quot;, &quot;toid&quot;: &quot;osgb4000000023296574&quot;, &quot;length&quot;: 10, &quot;polyline&quot;: [492144.493, 156762.059, 492149.35, 156750, 492195.75, 156630], &quot;positiveNode&quot;: &quot;osgb4000000023183408&quot;}, {&quot;index&quot;: 3, &quot;term&quot;: &quot;Private Road - Restricted Access&quot;, &quot;nature&quot;: &quot;Single Carriageway&quot;, &quot;negativeNode&quot;: &quot;osgb4000000023183650&quot;, &quot;toid&quot;: &quot;osgb4000000023296638&quot;, &quot;length&quot;: 10, &quot;polyline&quot;: [492835.25, 156873.5, 493000, 156923, 493018.061, 156927.938], &quot;positiveNode&quot;: &quot;osgb4000000023183652&quot;}, {&quot;index&quot;: 4, &quot;term&quot;: &quot;Local Street&quot;, &quot;nature&quot;: &quot;Single Carriageway&quot;, &quot;negativeNode&quot;: &quot;osgb4000000023181163&quot;, &quot;toid&quot;: &quot;osgb4000000023388466&quot;, &quot;length&quot;: 10, &quot;polyline&quot;: [498136.506, 149148.313, 498123.784, 149143.969, 498119.223, 149143.411, 498116.43, 149143.318, 498113.638, 149145.179], &quot;positiveNode&quot;: &quot;osgb4000000023806248&quot;}]
  </code></pre>
  <p>As you can see, this isn't as visually readable as the original JSON file. I am able to read it line by line successfully but it is printed as one single line in Sublime Text. Is there a formatting side to JSON dumps that I am missing?</p>