我对 msgpack的haskell和python客户端之间的差异感到困惑。这个:
import Data.MessagePack as MP
import Data.ByteString.Lazy as BL
BL.writeFile "test_haskell" $ MP.pack (0, 2, 28, ())
和这个:
import msgpack
with open("test_python", "w") as f:
f.write(msgpack.packb([0, 2, 28, []]))
给我不同的文件:
$ diff test_haskell test_python
Binary files test_haskell and test_python differ
谁能解释一下,我做错了什么?也许我误解了一些关于ByteString
使用的东西?