Re: [PHP] json_decode mistery

[email protected] (tamouse mailing lists)
Newsgroups php.general
Message-ID <CAHUC_t8vqkqWkKVSWTEbVvfjMQLTHigA0pw7T1nZDpPY62YR3g@mail.gmail.com>
On Fri, May 24, 2013 at 2:06 AM, Radek Krejča <[email protected]> wrote:
> {"result_ok":true,"result_message":null,"client_name":"Radek Krej\u010da"}

How odd -- when i run that through json_decode, it works fine:

$d = '{"result_ok":true,"result_message":null,"client_name":"Radek
Krej\u010da"}';
echo "Initial: $d\n";
echo "Decoded:\n";
var_dump(json_decode($d));

echo "\n\nPHP Version: ".phpversion()."\n";

Output
======

Initial: {"result_ok":true,"result_message":null,"client_name":"Radek
Krej\u010da"}
Decoded:
object(stdClass)#1 (3) {
  ["result_ok"]=>
  bool(true)
  ["result_message"]=>
  NULL
  ["client_name"]=>
  string(13) "Radek Krejča"
}


PHP Version: 5.3.10-1ubuntu3.6
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.