php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #69422 json_encode() needs encoding specification
Submitted: 2015-04-10 21:57 UTC Modified: 2015-04-19 22:13 UTC
From: yohgaki@php.net Assigned:
Status: Open Package: JSON related
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: yohgaki@php.net
New email:
PHP Version: OS:

 

 [2015-04-10 21:57 UTC] 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.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-04-19 22:13 UTC] yohgaki@php.net
Related bug
https://bugs.php.net/bug.php?id=68456
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Thu Apr 02 11:01:22 2020 UTC