title: exclude some values in json_encode() with JSON_NUMERIC_CHECK
body: <p>I use CakePHP framework. I have an array which corresponds a model's records. I have to handle it in the way, that all the integers and floats are output as integers and floats just like in java without quotes(<code>111</code> or <code>11.1</code> instead of this <code>'111.1'</code> or <code>'11.1'</code>).  I found the way to return all the values in this way: <code>return json_encode($data, JSON_NUMERIC_CHECK);</code>. The question is: is there any way to exclude some numeric fields to be outpt in this way? In other words: I have two <strong>numeric</strong> fields: <code>field1</code> and <code>field2</code>, and they have to be with quotes. Meantime all other numeric fields must be without quotes. How could I implement this ?
  My array looks so:</p>
  
  <pre><code>array(
      (int) 0 =&gt; array(
          'password' =&gt; '*****',
          'id' =&gt; '2',
          'number' =&gt; '2',
          'debtor_number' =&gt; null,
          'name' =&gt; 'Ziegler',
          'firstname' =&gt; 'Lisa',
          'address' =&gt; 'Frau',
          'title' =&gt; '',
          'name_extension' =&gt; '',
          'company' =&gt; '',
          'company_function' =&gt; '',
          'street' =&gt; 'Feldbergstr. 13-15',
          'street2' =&gt; null,
          'postbox' =&gt; '',
          'street_or_postbox' =&gt; '1',
          'zip' =&gt; '60318',
          'city' =&gt; 'Frankfurt am Main',
  ),
      (int) 1 =&gt; array(
          'password' =&gt; '*****',
          'id' =&gt; '3',
          'number' =&gt; '3',
          'debtor_number' =&gt; null,
          'name' =&gt; 'Trappatoni',
          'firstname' =&gt; 'Günther',
          'address' =&gt; 'Herr',
          'title' =&gt; '',
          'name_extension' =&gt; '',
          'company' =&gt; '',
          'company_function' =&gt; '',
          'street' =&gt; 'Trilluper Weg 17',
          'street2' =&gt; null,
          'postbox' =&gt; '',
          'street_or_postbox' =&gt; '1',
          'zip' =&gt; '60594',
          'city' =&gt; 'Frankfurt am Main',
  </code></pre>