On Wed, Jun 10, 2015 at 7:57 PM, Yasuo Ohgaki <yohg...@ohgaki.net> wrote:

> On Wed, Jun 10, 2015 at 7:28 PM, Derick Rethans <der...@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.
>

JSON Schema could be used to encode huge numbers correctly, so I would like
to have it in the future also.

--
Yasuo Ohgaki
yohg...@ohgaki.net

Reply via email to