Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:40898 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 79708 invoked from network); 9 Oct 2008 14:44:11 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 Oct 2008 14:44:11 -0000 Authentication-Results: pb1.pair.com smtp.mail=jarismar_silva@adplabs.com.br; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=jarismar_silva@adplabs.com.br; sender-id=pass Received-SPF: pass (pb1.pair.com: domain adplabs.com.br designates 201.84.224.135 as permitted sender) X-PHP-List-Original-Sender: jarismar_silva@adplabs.com.br X-Host-Fingerprint: 201.84.224.135 mx.adplabs.com.br Linux 2.6 Received: from [201.84.224.135] ([201.84.224.135:60421] helo=mx.adplabs.com.br) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 6A/FB-48736-AB81EE84 for ; Thu, 09 Oct 2008 10:44:11 -0400 Received: from kafe.adplabs.com.br (mail.adplabs.com.br [201.84.224.133]) by mx.adplabs.com.br (Postfix) with ESMTP id 227E44E418D; Thu, 9 Oct 2008 11:44:08 -0300 (BRT) Received: from [10.159.1.169] (jarismar.adplabs.com.br [10.159.1.169]) by kafe.adplabs.com.br (Postfix) with ESMTP id 1E947414DAE; Thu, 9 Oct 2008 11:44:03 -0300 (BRT) Message-ID: <48EE18E7.4020506@adplabs.com.br> Date: Thu, 09 Oct 2008 11:44:55 -0300 User-Agent: Thunderbird 2.0.0.14 (Windows/20080421) MIME-Version: 1.0 To: Dave Ingram CC: Stefan Walk , Lukas Kahwe Smith , David Coallier , internals@lists.php.net References: <48EDFEED.8080605@adplabs.com.br> <200810091551.23205.et@php.net> <48EE0DE1.1010603@dmi.me.uk> In-Reply-To: <48EE0DE1.1010603@dmi.me.uk> Content-Type: multipart/alternative; boundary="------------030306040407040803080905" X-ADPLabs-MailScanner-Information: Please contact your ISP for more information X-ADPLabs-MailScanner: Found to be clean X-ADPLabs-MailScanner-From: jarismar_silva@adplabs.com.br X-Spam-Status: No Subject: Re: [PHP-DEV] json_encode ignores protected/private class members From: jarismar_silva@adplabs.com.br (Jarismar Chaves da Silva) --------------030306040407040803080905 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Yes, it like it too. Just like an OOP should be. Dave Ingram wrote: >>> however changing this at this point would be a huge security issue, so >>> if at all, it would need to be handled by an optional parameter that >>> defaults to false. >>> >>> >> That would be unclean. If it's implemented in some way, json_encode should >> look for the implementation of some interface (JSONEncodable or something) >> providing encoding/decoding methods (similar to __sleep/__wakeup). >> >> > I must say that does sound like a very elegant way of doing things. Then > the default for __json_encode() would encode the public members, and > there would be no default __json_decode(), I suppose. > > > Dave > > -- *Jarismar Chaves da Silva, M.Sc.* *ADP**Labs** Brazil** *+55 51 3327 1491 -- Direct +55 51 9947 3613 -- Mobile jarismar_silva@adplabs.com.br http://www.adp.com This message and any attachments are intended only for the use of the addressee and may contain information that is privileged and confidential. If the reader of the message is not the intended recipient or an authorized representative of the intended recipient, you are hereby notified that any dissemination of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by e-mail and delete the message and any attachments from your system. --------------030306040407040803080905--