import redis
import json
 
 
rs = redis.Redis(host='127.0.0.1', port=6379, db=0, decode_responses=True, password='123456')
 
data = {
  "a": "1",
  "b": "2",
  "c": "3",
}
 
tmp = json.dumps(data)
rs.set("data", tmp)
strData = rs.get('data')
jsonData = json.loads(strData)
print(jsonData['a'])

来源:熊彬彬