Req #69422 [Opn]: json_encode() needs encoding specification
Edit report at https://bugs.php.net/bug.php?id=69422&edit=1
ID: 69422
Updated by: yohgaki@php.net
Reported by: yohgaki@php.net
Summary: json_encode() needs encoding specification
Status: Open
Type: Feature/Change Request
Package: JSON related
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
Related bug
https://bugs.php.net/bug.php?id=68456
Previous Comments:
------------------------------------------------------------------------
[2015-04-10 21:57:21] yohgaki@php.net
Description:
------------
Currently, json_encode() encode PHP int/float/bool as JSON numeric(int/float) and bool. Since JSON
numeric does not map to PHP int/float as JSON numeric could be any precision, large numbers need to
be stored as "string" which is converted to JSON string.
Some "string" needed to be encoded as numeric. To do that json_encode() needs some kind of
specification to encode data as programmer intended.
http://json-schema.org/examples.html
This could be used as the specification.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=69422&edit=1
Thread (4 messages)