Pass elm/bytes through a port?

Where would you put these functions if not in elm/json? If Bytes is now a fundamental data type in Elm, I don’t really see having it as a common dependency is much of an issue. Perhaps Bytes should even migrate into elm/core?

I think here you are talking about the case where on the JS side you have an Int32Array that you are passing into a port. When wrapped by DataView this gets presented as an 8-bit byte array. I also notice that elm/bytes understands what the host endianness is. So if you were to call Bytes.Decode.signedInt32 on these Bytes it should correctly decode to the right integer value.