Re: [VOTE] JSON number to string
| From: | Yasuo Ohgaki | Date: | Wed, 10 Jun 2015 10:57:36 +0000 |
| Subject: | Re: [VOTE] JSON number to string | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-86544@lists.php.net to get a copy of this message | ||
Hi Derick,
On Wed, Jun 10, 2015 at 7:28 PM, Derick Rethans <derick@php.net> wrote:
> > Hi,
> >
> > The voting is now open:
> >
> > https://wiki.php.net/rfc/json_numeric_as_string#voting
>
> FWIW, I voted no to all of them because (as you even say in the RFC),
> this is probably better be solved with a JSON schema thingy.
JSON Schema does not help to decoding/encoding numeric data without loosing
data.
JSON Schema Core
http://json-schema.org/latest/json-schema-core.html#anchor8
Note: JSON specification does not specify precision. So number could be any
number.
JSON Schema Validation
http://json-schema.org/latest/json-schema-validation.html#anchor5
Those who do not care rounding errors/etc, they can use default behavior.
Regards,
--
Yasuo Ohgaki
yohgaki@ohgaki.net