|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #57469 decode chokes on unquoted object keys
Submitted: 2007-01-05 08:43 UTC Modified: 2008-12-18 21:41 UTC
From: jan at horde dot org Assigned:
Status: Not a bug Package: json (PECL)
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: jan at horde dot org
New email:
PHP Version: OS:


 [2007-01-05 08:43 UTC] jan at horde dot org
json_decode() fails completely on the following code:

Reproduce code:

Expected result:
array(2) {
  object(stdClass)(2) {
    string(3) "tan"
    string(5) "sedan"
  object(stdClass)(2) {
    string(3) "red"
    string(6) "sports"
object(stdClass)(3) {
  string(3) "one"
  string(3) "two"
  string(5) "fi"ve"

Actual result:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2008-12-18 21:41 UTC]
The specification states that all keys are strings and 
therefore must be surrounded by quotes.
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Tue Dec 05 11:01:26 2023 UTC