How to save an ArrayBuffer in json file? I use electron-config for this, but in config.json I found \"{}\". I try convert (code) ArrayBuffer to string, but then I can\'t con
There are no ArrayBuffers in the JSON format (only strings, numbers, booleans, null
, objects and arrays) so if you want to save an ArrayBuffer in JSON then you'll have to represent it in one of those types (probably a string or an array of numbers).
Then when you read the JSON you will have to convert it back into an ArrayBuffer, reversing the transformation that you did before.