Hi Jakub, On Sat, Apr 11, 2015 at 1:37 AM, Jakub Zelenka <bu...@php.net> wrote:
> On Fri, Apr 10, 2015 at 1:29 AM, Yasuo Ohgaki <yohg...@ohgaki.net> wrote: >> >> Could you add "json_encode" type hint also? >> > >> Large int/float must be treated as string or GMP object (we don't have >> GMP float yet, though) >> > Currently, there is no way to encode large "numeric" JSON data correctly >> when it is stored as >> string. >> >> string json_encode ( mixed $value [, int $options = 0 [, int $depth = 512 >> [, array $type_spec = NULL]]] ) >> >> where $type_spec specifies correct data representation. i.e. numeric, >> string, bool >> >> json_encode() type hint should work like Zeev's type hint. >> i.e. No data type conversion, but validate its content. >> >> > Again this is a bit off-topic. I think that it would be good if you could > create a bug report for this. It would be great to add an example how the > $type_spec should work (e.g. if you mean something like > http://json-schema.org/examples.html ) > Yes. We need something like this to make jason_encode() work as it should. FR is added. https://bugs.php.net/bug.php?id=69422 Regards, -- Yasuo Ohgaki yohg...@ohgaki.net