Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:87155 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 59822 invoked from network); 13 Jul 2015 18:57:34 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 13 Jul 2015 18:57:34 -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.247 as permitted sender) X-PHP-List-Original-Sender: dean.eigenmann@icloud.com X-Host-Fingerprint: 17.158.42.247 nk11p07mm-asmtpout002.mac.com Solaris 10 1203 Received: from [17.158.42.247] ([17.158.42.247:55707] helo=nk11p07mm-asmtp002.mac.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 61/DD-43998-C1A04A55 for ; Mon, 13 Jul 2015 14:57:33 -0400 Received: from [10.182.63.252] (unknown [213.55.184.153]) by nk11p07mm-asmtp002.mac.com (Oracle Communications Messaging Server 7.0.5.35.0 64bit (built Mar 31 2015)) with ESMTPSA id <0NRF00C76WMZUI30@nk11p07mm-asmtp002.mac.com> for internals@lists.php.net; Mon, 13 Jul 2015 18:57:05 +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_10:2015-07-13,2015-07-13,1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=7.0.1-1412110000 definitions=main-1507130270 References: MIME-version: 1.0 (1.0) In-reply-to: Content-type: text/plain; charset=us-ascii Content-transfer-encoding: quoted-printable Message-ID: Cc: PHP Internals X-Mailer: iPhone Mail (12H143) Date: Mon, 13 Jul 2015 20:56:56 +0200 To: Benjamin Eberlei Subject: Re: [PHP-DEV] JsonSerializable New Interface method Proposal From: dean.eigenmann@icloud.com (Dean Eigenmann) I have updated the RFC with a new section showing the updates Sent from my iPhone > On 13 Jul 2015, at 20:47, Benjamin Eberlei wrote: >=20 > On Mon, Jul 13, 2015 at 3:22 PM, Dean Eigenmann > wrote: >=20 >> Ive just opened a new RFC https://wiki.php.net/rfc/jsonserializable regar= ding >> Json to Object unserialization. >=20 > The approach with typecasting will not work, because the function > json_decode doesn't have that information. >=20 > Instead something like the JMS Serializer api is probably necessary: $user= > =3D json_decode($data, 'User'); >=20 > I agree with Guilherme that we need a second interface for this, especiall= y > because changing the existing one would be a BC break.