Hi On 13 Jul 2015 14:23, "Dean Eigenmann" <dean.eigenm...@icloud.com> 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