[RFC] [VOTE] Preserve Fractional Part in JSON encode
| From: | Juan Basso | Date: | Sun, 11 Jan 2015 03:02:11 +0000 |
| Subject: | [RFC] [VOTE] Preserve Fractional Part in JSON encode | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-80346@lists.php.net to get a copy of this message | ||
I'd like to initiate a vote on this RFC:
https://wiki.php.net/rfc/json_preserve_fractional_part
TLDR: this RFC would add a new json_encode option to preserve fractional
part of float numbers when they are 0. Ie, encoding (float)10 to json will
be 10.0.
PS: This is not enabled by default.
The code was implemented and available on
https://github.com/php/php-src/pull/642
Preview discussions on:
- http://marc.info/?l=php-internals&m=141507087629656&w=2
- http://marc.info/?l=php-internals&m=141953602116283&w=2
Thanks,
Juan Basso