Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:48326 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 30864 invoked from network); 18 May 2010 21:22:29 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 May 2010 21:22:29 -0000 X-Host-Fingerprint: 209.131.62.146 nat-dip11.cfw-b-gci.corp.yahoo.com Received: from [209.131.62.146] ([209.131.62.146:10495] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 20/90-27340-41503FB4 for ; Tue, 18 May 2010 17:22:29 -0400 Message-ID: <20.90.27340.41503FB4@pb1.pair.com> To: internals@lists.php.net Date: Tue, 18 May 2010 14:22:26 -0700 User-Agent: Thunderbird 2.0.0.21 (Macintosh/20090302) MIME-Version: 1.0 References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Posted-By: 209.131.62.146 Subject: Re: Jsonable interface From: pollita@php.net (Sara Golemon) Mathias Grimm wrote: > If php have annotations feature its be very simple. > > Transient private $dtCreated;// or JsonIgnore or JsonTransient > [*snip*] This seems to be an attempt to solve a subset of the problem solved by JSONSerializable, but from a negation rather than a explicit orientation. What this doesn't provide, is the ability to serialize an object with modified or even completely different data from what is found in the base properties (something which may well be desired). This approach also has the very obvious added workload of introducing property traits (something I'm not against, but would require a great deal more discussion). Given that it does less at higher cost, I'm inclined to reply with "meh". -Sara