This repository has been archived by the owner on Apr 22, 2023. It is now read-only.
make JSON.stringify(buffer)
not effectively blow up
#3905
Labels
Currently JSON.stringify on a Buffer will emit the parent "SlowBuffer", which is big. That's a pain.
On potential solution would be to make the
parent
(andoffset
) fields of a buffer non-enumerable, thenJSON.stringify
(I think) wouldn't include them.Another solution would be add a
Buffer.toJSON
.In discussion with @isaacs:
I'd appreciate pointers on how I could try out making Buffer.{parent,offset} non-enumerable. Also, thoughts would be welcome.
The text was updated successfully, but these errors were encountered: