title: PHP json_decode integers and floats to string
body: <p>I want to pre-parse a json an convert all numbers in the json (integers or float) to strings.</p>
  
  <p>For example:</p>
  
  <pre><code>{
   "integer": 10000,
   "big_integer": 100000999499498485845848584584584,
   "float1" : 1.121212,
   "float2" : 8.226347662837406e+09
  }
  </code></pre>
  
  <p>to this:</p>
  
  <pre><code>{
   "integer": "10000",
   "big_integer": "100000999499498485845848584584584",
   "float1" : "1.121212",
   "float2" : "8226347662.837406"
  }
  </code></pre>
  
  <p><strong><em>Update</em></strong>
  I have found the <a href="https://stackoverflow.com/questions/1777382/php-json-decode-on-a-32bit-server?answertab=active#tab-top">following</a> but it does not work for floats: </p>
  
  <pre><code>$jsonString = '[{"name":"john","id":5932725006},{"name":"max","id":4953467146}]';
  
  echo preg_replace('/("\w+"):(\d+)/', '\\1:"\\2"', $jsonString);
  //prints [{"name":"john","id":"5932725006"},{"name":"max","id":"4953467146"}]
  </code></pre>
  
  <p><strong><em>Update 2</em></strong> Fixed second float value. It had two points. </p>