Open jwrightecs opened 4 months ago
I've checked in an enhancement to use the TO_JSON
(or FREEZE
) method for objects.
I don't think it is neccessary to add conditionals convert_blessed
/allow_blessed
. Do you?
It would probably go against the relaxed spirit of the module, so no,
When encountering a blessed object in a Perl structure, JSON::Relaxed encodes it as a JSON string, using either the default stringification (
Class::Name=REFTYPE(0x0abcd09abc)
) or any overloaded stringification""
.It should probably have an option to either use the objects
TO_JSON
(TO_RJSON
?) orFREEZE
method ("allow_blessed"), encode it as anull
("allow_blessed"), or fail to encodeoutputs