>> however changing this at this point would be a huge security issue, so
>> if at all, it would need to be handled by an optional parameter that
>> defaults to false.
>>     
>
> That would be unclean. If it's implemented in some way, json_encode should 
> look for the implementation of some interface (JSONEncodable or something) 
> providing encoding/decoding methods (similar to __sleep/__wakeup).
>   
I must say that does sound like a very elegant way of doing things. Then
the default for __json_encode() would encode the public members, and
there would be no default __json_decode(), I suppose.


Dave

Reply via email to