Try this:
import ast
ast.literal_eval(b'{"name":"john", "lastname":"Doe"}'.decode("utf-8"))
literal_eval
evaluates strings into the pythonic equivalent of their content. The decode
is needed in order to turn bytes
into str
.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…