Fix issues with parsing JSON from buffers

Does so in a way that works on both 3.28 and 3.30. Adds a function to
`utils.js` to detect whether an object is a Uint8Array or ByteArray and
convert it to a string accordingly.

Closes #139.
3 jobs for fix-warning in 12 minutes and 31 seconds (queued for 1 second)