Closed budney closed 3 years ago
@budney, thanks for the pull request!
I would like to merge it, but could you please help me figuring why tests are failing on your branch?
I've fixed the broken tests by making the code change much more specific: it now does what it used to for any reference EXCEPT filehandles.
Instead of serializing the body whenever it's a reference, this change limits that behavior to when the body is a logical array reference, thus letting file handles be processed downstream. The primary effect of this change is that the Encoder object doesn't get invoked, so the creator of the file handle is fully responsible for ensuring that the bodyd is encoded correctly.