Re: [PHP-DEV] json(Raw)Serializable?

2017-10-24 Thread Fleshgrinder
On 10/24/2017 2:20 AM, Sara Golemon wrote: > https://bugs.php.net/bug.php?id=75400 is asking for a version of > JsonSerializable which doesn't involve deserializing/reserialzing > round trips when a chunk of JSON is known in advance. > > It's not terribly unreasonable IMO, but before I just

Re: [PHP-DEV] json(Raw)Serializable?

2017-10-24 Thread Jakub Zelenka
On Tue, Oct 24, 2017 at 7:32 AM, Stanislav Malyshev wrote: > Hi! > > > It's not terribly unreasonable IMO, but before I just writeup the RFC > > as described (jsonRawSerialize taking preceedence over jsonSerialize), > > I thought I'd ask for opinions on the specifics. > > >

Re: [PHP-DEV] json(Raw)Serializable?

2017-10-24 Thread Niklas Keller
> > Hi! > > > It's not terribly unreasonable IMO, but before I just writeup the RFC > > as described (jsonRawSerialize taking preceedence over jsonSerialize), > > I thought I'd ask for opinions on the specifics. > > > > In psuedo-code: > > > > if (is_object($obj)) { > > if ($obj implements

Re: [PHP-DEV] json(Raw)Serializable?

2017-10-24 Thread Stanislav Malyshev
Hi! > It's not terribly unreasonable IMO, but before I just writeup the RFC > as described (jsonRawSerialize taking preceedence over jsonSerialize), > I thought I'd ask for opinions on the specifics. > > In psuedo-code: > > if (is_object($obj)) { > if ($obj implements JsonRawSerializable) { >

[PHP-DEV] json(Raw)Serializable?

2017-10-23 Thread Sara Golemon
https://bugs.php.net/bug.php?id=75400 is asking for a version of JsonSerializable which doesn't involve deserializing/reserialzing round trips when a chunk of JSON is known in advance. It's not terribly unreasonable IMO, but before I just writeup the RFC as described (jsonRawSerialize taking