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"))
Standard input is empty
[u'\xff\xff\xff\xff'] ["\u00ff\u00ff\u00ff\u00ff"] [u'\xff\xff\xff\xff']
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!