Re: JSON float number as string
| From: | Jakub Zelenka | Date: | Mon, 30 Mar 2015 08:45:20 +0000 |
| Subject: | Re: JSON float number as string | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-85542@lists.php.net to get a copy of this message | ||
Hi Yasuo
On Mon, Mar 30, 2015 at 1:07 AM, Yasuo Ohgaki <yohgaki@ohgaki.net> wrote:
>
> "int" should be fixed also.
> http://3v4l.org/95dHM
>
>
We have already fix for this: JSON_BIGINT_AS_STRING ( http://3v4l.org/vYXUk
)
> So option may be JSON_SCALAR_AS_STRING or
> additional JSON_INT_AS_STRING.
>
>
I was actually thinking about JSON_INT_AS_STRING anyway as it might be
useful for type consistency in decoding (when decoding number that are
close to bigint limit) and allowing safe encoding from 64bit to 32bit.
However this is a bit more controversial so I plan to open a new thread
about it.
Cheers
Jakub