title: python JSON array newlines
body: <p>I have a large dictionary that has some large array data in it:</p>
  
  <pre><code>d = {'something': {'else': 'x'}, 'longnumbers': [1,2,3,4,54,6,67,7,7,8,8,8,6,4,3,3,5,6,7,4,3,5,6,54]}
  </code></pre>
  
  <p>The real dictionary has many more keys and a nested structure. When I use <code>json.dump</code> without <code>indent</code>, I get a compact, single-line output which is not readable. When I set <code>indent</code>, it puts newlines after every separator, including the arrays.</p>
  
  <p>The numerical arrays are long and end up like this:</p>
  
  <pre><code>  "longnumbers": [
      1, 
      2, 
      3, 
      4, 
      54, 
      6, 
      67, 
      7, 
      7, 
      8, 
      8, 
      8, 
      6, 
      4, 
      3, 
      3, 
      5, 
      6, 
      7, 
      4, 
      3, 
      5, 
      6, 
      54
    ], 
  </code></pre>
  
  <p>Is there any way to get pretty-printed JSON with an indent level, but without placing newlines after array elements? For the example above, I'd like something like this:</p>
  
  <pre><code>{
    "longnumbers": [1, 2, 3, 4, 54, 6, 67, 7, 7, 8, 8, 8, 6, 4, 3, 3, 5, 6, 7, 4, 3, 5, 6, 54],
    "something": {
      "else": "x"
    }
  }
  </code></pre>