Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:87149 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 38754 invoked from network); 13 Jul 2015 15:06:47 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 13 Jul 2015 15:06:47 -0000 Authentication-Results: pb1.pair.com smtp.mail=dean.eigenmann@icloud.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=dean.eigenmann@icloud.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain icloud.com designates 17.158.42.246 as permitted sender) X-PHP-List-Original-Sender: dean.eigenmann@icloud.com X-Host-Fingerprint: 17.158.42.246 nk11p07mm-asmtpout001.mac.com Solaris 10 1203 Received: from [17.158.42.246] ([17.158.42.246:55941] helo=nk11p07mm-asmtp001.mac.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 4B/9A-43998-404D3A55 for ; Mon, 13 Jul 2015 11:06:46 -0400 Received: from [10.177.176.52] (unknown [213.55.184.199]) by nk11p07mm-asmtp001.mac.com (Oracle Communications Messaging Server 7.0.5.35.0 64bit (built Mar 31 2015)) with ESMTPSA id <0NRF00LEFLY2LH30@nk11p07mm-asmtp001.mac.com> for internals@lists.php.net; Mon, 13 Jul 2015 15:06:07 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.14.151,1.0.33,0.0.0000 definitions=2015-07-13_09:2015-07-13,2015-07-13,1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=2 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=7.0.1-1412110000 definitions=main-1507130213 References: <59f8fa10-10d2-4498-91a8-bacc3fcab4ed@me.com> <55A3D26B.7080805@gmail.com> MIME-version: 1.0 (1.0) In-reply-to: <55A3D26B.7080805@gmail.com> Content-type: text/plain; charset=us-ascii Content-transfer-encoding: quoted-printable Message-ID: <3594A659-271D-4A4D-9AB1-2A9D36A9DD10@icloud.com> Cc: "internals@lists.php.net" X-Mailer: iPhone Mail (12H143) Date: Mon, 13 Jul 2015 17:06:00 +0200 To: Rowan Collins Subject: Re: [PHP-DEV] JsonSerializable New Interface method Proposal From: dean.eigenmann@icloud.com (Dean Eigenmann) I will update the spec for it to be a function, called something like json_d= ecode_to($json, $class, $mapping =3D []); With mapping you could then specify with array keys map to which class prope= rty. Sent from my iPhone > On 13 Jul 2015, at 16:59, Rowan Collins wrote: >=20 > guilhermeblanco@gmail.com wrote on 13/07/2015 15:19: >> What about JsonDeserializable? I would like to have the choice to have a >> serialize-only operation. >=20 > Yeah, this would need to be a new interface, because interfaces can't have= optional methods, so changing the existing interface would instantly break a= ll existing implementations, which would be a big no-no IMHO. >=20 > --=20 > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php >=20