Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:87158 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 65581 invoked from network); 13 Jul 2015 19:39:02 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 13 Jul 2015 19:39:02 -0000 Authentication-Results: pb1.pair.com smtp.mail=jakub.php@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=jakub.php@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.213.170 as permitted sender) X-PHP-List-Original-Sender: jakub.php@gmail.com X-Host-Fingerprint: 209.85.213.170 mail-ig0-f170.google.com Received: from [209.85.213.170] ([209.85.213.170:36530] helo=mail-ig0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 42/EE-43998-1D314A55 for ; Mon, 13 Jul 2015 15:38:59 -0400 Received: by igbij6 with SMTP id ij6so29933909igb.1 for ; Mon, 13 Jul 2015 12:38:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=QApxhTvbRlJ0mSbdc1FGVc/4U6SxHrdEFEMhRElEsrU=; b=j9m038v+KfltYk/S5csIYCwdwmd7VjZ5dryHt+MpXujmHELlxhBm7j7wuM9tELLEq/ 9RACCJD/bs985cAiFA7vBDQnGN49Vic1j0QBOcFQhFYpZ8aV5UcYlLRmpf9aBkCoCDlu LOdY2KYoTLFdvuobaDb2zsM7BABnZB6K393TJ0WqWjoaQHX8EdjAZ0PsWPizMKF8OB5n dx7VaXJbfxI6DSsbBVzYn/yNFX5hT3D1TJTgTVx9v4RPTeE9BnsQgKDTs6oiGf6AvmY6 l6QwS5zVaQdOrvFyC2U2F/ar91c1Z94YQhFR5S2TcEP7hkNJyHIfea2bm5THSnacAYEY M+mA== MIME-Version: 1.0 X-Received: by 10.50.13.34 with SMTP id e2mr14227156igc.23.1436816334897; Mon, 13 Jul 2015 12:38:54 -0700 (PDT) Sender: jakub.php@gmail.com Received: by 10.107.20.68 with HTTP; Mon, 13 Jul 2015 12:38:54 -0700 (PDT) Received: by 10.107.20.68 with HTTP; Mon, 13 Jul 2015 12:38:54 -0700 (PDT) In-Reply-To: References: Date: Mon, 13 Jul 2015 20:38:54 +0100 X-Google-Sender-Auth: ysegR8G7mTai3AvqnL5TabjJcD4 Message-ID: To: Dean Eigenmann Cc: internals@lists.php.net Content-Type: multipart/alternative; boundary=089e01182d043fc8b7051ac6df92 Subject: Re: [PHP-DEV] JsonSerializable New Interface method Proposal From: bukka@php.net (Jakub Zelenka) --089e01182d043fc8b7051ac6df92 Content-Type: text/plain; charset=UTF-8 Hi On 13 Jul 2015 14:23, "Dean Eigenmann" wrote: > > Ive just opened a new RFC https://wiki.php.net/rfc/jsonserializable regarding Json to Object unserialization. As it's been said, the first part (casting) is a no-go. It would have to be done in a run time by scanning of opcode array which is not nice. The updated proposal ( json_decode_to_class ) could be implemented with small modification (missing options param for decoding options) but the general idea is limited to top level object. It means that you cannot use it on array of objects or nested objects (properties objects). This is however something that could be addressed by extended JsonSchema that I described https://www.mail-archive.com/internals@lists.php.net/msg78698.html As I said before, such implementation will take much more time as I have got couple of more other things on my list that I want to do on json before that (sort of prerequisite). It means that the question is if we want an uncomplete limited solution now or wait slightly longer for a proper solution. My opinion is that we should wait longer and have a proper solution. Cheers Jakub --089e01182d043fc8b7051ac6df92--