Bug #63152 [Opn->Nab]: Json is going stupid

From: Date: Mon, 24 Sep 2012 15:24:07 +0000
Subject: Bug #63152 [Opn->Nab]: Json is going stupid
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-173684@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=63152&edit=1 ID: 63152 Updated by: rasmus@php.net Reported by: staff at newsocialife dot com Summary: Json is going stupid -Status: Open +Status: Not a bug Type: Bug Package: JSON related Operating System: Ubuntu PHP Version: 5.3.17 Block user comment: N Private report: N New Comment: JSON as per RFC-4626 cannot encode arbitrary binary data. Everything you pass to json_encode() must be valid Unicode. json_last_error() would have told you this. Previous Comments: ------------------------------------------------------------------------ [2012-09-24 15:14:39] staff at newsocialife dot com Description: ------------ So, I have an array witch doesn't encode right in json... ( look the example script... ) Test script: --------------- $a = Array ( "password" => "SeRjQRVUglkeM‰‰P9L7NsjKXOY", //it's encrypted with a custom encryption system "id" => 0 ); echo json_encode($a); Expected result: ---------------- {"password":"SeRjQRVUglkeM‰‰P9L7NsjKXOY","id":0} Actual result: -------------- {"password":null,"id":0} ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=63152&edit=1

« previous php.bugs (#173684) next »