php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #61690 \x22 is converted to " before parsing the json string
Submitted: 2012-04-10 16:44 UTC Modified: 2012-04-11 02:11 UTC
From: knives dot dev at gmail dot com Assigned:
Status: Not a bug Package: JSON related
PHP Version: 5.3Git-2012-04-10 (snap) OS: ubuntu linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
26 + 9 = ?
Subscribe to this entry?

 
 [2012-04-10 16:44 UTC] knives dot dev at gmail dot com
Description:
------------
When decoding a json string that contains the hex code for double quote character (") it will not decode properly. I believe this is because it is converting it to a " before looking at the syntax and converting the json to php.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-04-11 02:11 UTC] aharvey@php.net
-Status: Open +Status: Not a bug -Package: json +Package: JSON related
 [2012-04-11 02:11 UTC] aharvey@php.net
JSON doesn't support \x escapes, so it's invalid JSON by definition, hence why json_decode() returns null. Decoding the valid JSON \u0022 works fine.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 05:01:28 2024 UTC