import json
L = [b'\xff\xff\xff\xff'.decode("latin1")]
print(L)
s = json.dumps(L)
print(s)
LL = json.loads(s)
print(LL)
assert all(b == b"\xff" for b in LL[0].encode("latin1"))