I will update the spec for it to be a function, called something like json_decode_to($json, $class, $mapping = []);
With mapping you could then specify with array keys map to which class property. Sent from my iPhone > On 13 Jul 2015, at 16:59, Rowan Collins <rowan.coll...@gmail.com> wrote: > > guilhermebla...@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. > > Yeah, this would need to be a new interface, because interfaces can't have > optional methods, so changing the existing interface would instantly break > all existing implementations, which would be a big no-no IMHO. > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php