I am using ipfs-http-client to read the contents of a file form infura, how do i use the “cat” funtionality to correctly get the data in a string/json format? right now i am just getting a array of binaries on the console log. Answer From this point on its just a matter of decoding the content buffer. If the content
Tag: uint8array
Sending Uint8Array (BSON) in a JSON object
I’m using the ‘bson’ npm package in the browser for converting / serializing a JSON object to BSON. The documentation says that it returns a Node.js buffer. The documentation of Node.js says that a buffer is of type ‘Uint8Array’. Now I want to send this Uint8Array in another JSON object (infoJSON) but JSON does not support Uint8Array. I tried to