I have large Javascript objects which I would like to encode to base-64 for AWS Kinesis` It turns out that:
let objStr = new Buffer(JSON.stringify(obj), 'ascii');
new Buffer(objStr, 'base64').toString('ascii') !== objStr
I'm trying to keep this as simple as possible.
How can I base-64 encode JSON and safely decode it back to its original value?
base-64
whatJSON.parse(JSON.stringify(obj))
does on objects. How can I do that?