title: Json string formatting with python
body: <p>I'd like to know if there is any way to format the resulting strings of the enconding of some object with json in python. For example, suppose I have the following dictionary:</p>
  
  <pre><code>{'a': 12.73874, 'b': 1.74872, 'c': 8.27495}
  </code></pre>
  
  <p>and the result of the json encoding is:</p>
  
  <pre><code>{
      "c": 8.27495,
      "b": 1.74872,
      "a": 12.73874
  }
  </code></pre>
  
  <p>while the result I want is:</p>
  
  <pre><code>{
      "a": 12.74,
      "c": 8.28,
      "b": 1.75
  }
  </code></pre>
  
  <p>Notice the order of the elements and the decimal places of each number. Is there any way to do this?</p>
  
  <p>Thanks in advance!</p>