Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:40885 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 38283 invoked from network); 9 Oct 2008 12:53:26 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 Oct 2008 12:53:26 -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:34314] helo=mx.adplabs.com.br) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C9/03-48736-5CEFDE84 for ; Thu, 09 Oct 2008 08:53:25 -0400 Received: from kafe.adplabs.com.br (mail.adplabs.com.br [201.84.224.133]) by mx.adplabs.com.br (Postfix) with ESMTP id 53E564E4183 for ; Thu, 9 Oct 2008 09:53:22 -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 44BA7415055 for ; Thu, 9 Oct 2008 09:53:17 -0300 (BRT) Message-ID: <48EDFEED.8080605@adplabs.com.br> Date: Thu, 09 Oct 2008 09:54:05 -0300 User-Agent: Thunderbird 2.0.0.14 (Windows/20080421) MIME-Version: 1.0 To: internals@lists.php.net Content-Type: multipart/alternative; boundary="------------030604010104060602030303" 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: json_encode ignores protected/private class members From: jarismar_silva@adplabs.com.br (Jarismar Chaves da Silva) --------------030604010104060602030303 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hi internals, Does anyone knows why json_encode ignores protected/public class members ? I've searching about it on documentation an mailing lists but found nothing but workarounds. Until now I'm forced to change my classes to use public members when I need to send a PHP object on e.g. AJAX responses. It would be nice if json_encode also send those attributes or at least have a parameter to whether send non-public attributes or not. Thanks in advance. Jaris. -- *Jarismar Chaves da Silva, M.Sc.* *ADP**Labs** Brazil** *jarismar_silva@adplabs.com.br http://www.adp.com --------------030604010104060602030303--