Node.js buffer toJSON() Method
Example
Return the buffer object as a JSON object:
var buf = Buffer.from('abc');
console.log(buf.toJSON());
Run example »
Definition and Usage
The toJSON() method returns a JSON object based on the Buffer object.
Syntax
buffer.toJSON();
Technical Details
Return Value: | A JSON object |
---|---|
Node.js Version: | 0.9.2 |
Copyright 1999-2023 by Refsnes Data. All Rights Reserved.