Bug #61690 [Opn->Nab]: \x22 is converted to " before parsing the json string

From: Date: Wed, 11 Apr 2012 02:11:56 +0000
Subject: Bug #61690 [Opn->Nab]: \x22 is converted to " before parsing the json string
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-169421@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=61690&edit=1

 ID:                 61690
 Updated by:         aharvey@php.net
 Reported by:        knives dot dev at gmail dot com
 Summary:            \x22 is converted to " before parsing the json
                     string
-Status:             Open
+Status:             Not a bug
 Type:               Bug
-Package:            json
+Package:            JSON related
 Operating System:   ubuntu linux
 PHP Version:        5.3Git-2012-04-10 (snap)
 Block user comment: N
 Private report:     N

 New Comment:

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.


Previous Comments:
------------------------------------------------------------------------
[2012-04-10 16:44:40] 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.



------------------------------------------------------------------------



-- 
Edit this bug report at https://bugs.php.net/bug.php?id=61690&edit=1


Thread (1 message)

  • aharvey@php.net
  • Unknown Message
    • aharvey@php.net
« previous php.bugs (#169421) next »