Subject: | allow a per-JSON object to-json converter |
I absolutely love JSON.pm. I use it daily, all the time, and it never does anything wrong for
me. Thanks!
It has only one problem which has bothered me for quite some time, and I would *love* to
see it addressed: I would like a way to provide a TO_JSON-like callback to my JSON object. I
do not want to create a UNIVERSAL::TO_JSON, as adding methods to UNIVERSAL tends to lead
to horrible stupid problems later. Instead, I would like a way to say:
->convert_blessed(1)
->convert_blessed_fallback(sub { ... });
Is this an acceptable proposal? While it would be fantastic if it got coded while I wasn't
looking, I would be willing to have a pass at it, if it's something you'd accept.
Thanks again for JSON.pm!
--
rjbs