Thanks for jumping into the discussion! :) It's always great to hear from a maintainer.
I'm curious why BSON may not be the right choice. If passing a raw scalar or array is problematic, wouldn't this be a reasonable solution?
encode({data => $some_scalar});
Whether $some_scalar contains an array ref, a hash ref, or a flat scalar, encode would still see it as a hash based document.
But I don't have a lot of experience with BSON. I remember seeing it presented a few years ago at a PerlMongers meeting in So. Cal, and it stuck in my head as a more portable solution for data serialization when the data might contain binary elements.
I was a little surprised to see that there is no (documented) "TO_BSON" means of providing serialization procedures for objects. Is there any plan for that sort of hook in the future?
(Sorry to hijack the thread!)
|