> 24 мая 2015 г., в 19:02, Jakub Zelenka <bu...@php.net> написал(а):
> 
> Hi,
> 
> I would like to introduce my and Pasindu's RFC that proposes adding of new
> JSON options for converting number values to string when decoding and/or
> encoding:
> 
> https://wiki.php.net/rfc/json_numeric_as_string
> 
> Personally I'm not a big fun of these options because of their drawbacks
> (see RFC section about that) and because I think that Json Scheme is a
> better way to go. However I'm not sure when and if I have time for Json
> Schema implementation, so this could be useful for some users the meantime.
> That is especially case of JSON_FLOAT_TO_STRING for decoding (encoding is a
> bit weird at it requires usage ini precision to do something useful). That
> (decoding) seems like a sort of a variant of JSON_BIGINT_TO_STRING for
> floats. That will be probably the only option that I will be vote for.

I'm not sure how JSON Schema would help here. The issue is about converting 
from json's huge numbers to limited PHP's numbers. Schema just doesn't have 
notion of native types

Anyway, as I told in a previous thread, while approach of this rfc solves 
immediate problem, it is not future-proof flexible and exposing low-level type 
based parsing is a better idea 
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to