json字符串和dict互转
import json str = '{"params":[{"id":222,"offset":0},{"nodename":"topic"}]}' params = json.loads(str) print(params)