Re: JsonSerializable New Interface method Proposal

From: Date: Mon, 13 Jul 2015 19:38:54 +0000
Subject: Re: JsonSerializable New Interface method Proposal
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-87158@lists.php.net to get a copy of this message
Hi On 13 Jul 2015 14:23, "Dean Eigenmann" <dean.eigenmann@icloud.com> wrote: > > Ive just opened a new RFC https://wiki.php.net/rfc/jsonserializable]�xC > iUÙ¯C�€Ï 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

« previous php.internals (#87158) next »