title: json.encoder.FLOAT_REPR changed but no effect
body: <p>I am trying to make my JSON encoder dump floats with only 2 decimal precision. So '2.241' becomes '2.24'</p>
  
  <p>I've read in <a href="https://stackoverflow.com/a/1447581/5324953">this answer by Alex Martelli</a> that you can overwrite the default FLOAT_REPR of json.encoder. I have tried the following:</p>
  
  <pre><code>&gt;&gt;&gt; import json
  &gt;&gt;&gt; json.encoder.FLOAT_REPR = lambda o: format(o, '.2f')
  </code></pre>
  
  <p>But I dont get the same results:</p>
  
  <pre><code>&gt;&gt;&gt; json.dumps(2.241)
  '2.241'
  </code></pre>
  
  <p>And I can even verify the FLOAT_REPR is changed:</p>
  
  <pre><code>&gt;&gt;&gt; print json.encoder.FLOAT_REPR
  &lt;function &lt;lambda&gt; at 0xb....&gt;
  </code></pre>
  
  <p>And works as expected:</p>
  
  <pre><code>&gt;&gt;&gt; json.encoder.FLOAT_REPR(2.241)
  2.24
  </code></pre>
  
  <p>Why is the built-in JSON module not using the FLOAT_REPR when I can see that it has been overwritten and the solution should be working according to Alex Martelli? </p>
  
  <p>I have tested this on two different computers, both running Python 2.7.6 on Ubuntu 14.0.4.</p>