Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:48331 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 40007 invoked from network); 18 May 2010 21:56:08 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 May 2010 21:56:08 -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:11943] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 41/62-27340-7FC03FB4 for ; Tue, 18 May 2010 17:56:07 -0400 Message-ID: <41.62.27340.7FC03FB4@pb1.pair.com> To: internals@lists.php.net Date: Tue, 18 May 2010 14:56:04 -0700 User-Agent: Thunderbird 2.0.0.21 (Macintosh/20090302) MIME-Version: 1.0 References: <20.90.27340.41503FB4@pb1.pair.com> 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: [PHP-DEV] Re: Jsonable interface From: pollita@php.net (Sara Golemon) I didn't say that I didn't understand the purpose of it. I said that it provides less functionality than what we already have implemented. Mathias Grimm wrote: > _json function to override properties and jsonIgore properties > > when call json_encode($obMyClass) the __json and __jsonIgore will be called. > > if a class is jsonable, this means that all properties will be encoded, > except properties on the ignore list > > >> 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 >> >> -- >> PHP Internals - PHP Runtime Development Mailing List >> To unsubscribe, visit: http://www.php.net/unsub.php >> >> > >