fork download
  1. import json
  2. L = [b'\xff\xff\xff\xff'.decode("latin1")]
  3. print(L)
  4. s = json.dumps(L)
  5. print(s)
  6. LL = json.loads(s)
  7. print(LL)
  8. assert all(b == b"\xff" for b in LL[0].encode("latin1"))
Success #stdin #stdout 0.1s 8888KB
stdin
Standard input is empty
stdout
[u'\xff\xff\xff\xff']
["\u00ff\u00ff\u00ff\u00ff"]
[u'\xff\xff\xff\xff']