Skip to content

feat: stringify buffers 🧵

Compare
Choose a tag to compare
@pwmcintyre pwmcintyre released this 06 Feb 03:15
· 5 commits to master since this release
2e9ee75

previously Buffers are stringified as objects - eg:

> JSONSerializer({ word: Buffer.from('example') })
{"word":{"type":"Buffer","data":[101,120,97,109,112,108,101]}}

this proposal updates the default JSON Serializer to stringify buffers - eg:

> JSONSerializer({ word: Buffer.from('example') })
{"word":"example"}