import json

jsonStr = '{"result":[["卫衣女春2018","8.092529385849389"],["卫衣上衣春 春秋","8.022499133719828"],["卫衣 秋 女","7.963854696462119"],["卫衣2017女秋","8.033525396543094"],["卫衣不带帽子女","8.036049751550866"],["卫衣外套宽松女","8.036109676892297"],["卫衣女长袖宽松上衣","8.016274388878704"],["卫衣女春秋不收边","8.056971186377892"],["卫衣女长袖 秋薄","8.048634073251334"],["卫衣女2018 新","8.064379456712274"]]}'

# 将json格式转为 python数据类型对象
jsonData = json.loads(jsonStr)
print(jsonData)
# 类型  类型是 dict 字典
print(type(jsonData))

result = jsonData["result"]
print(result)

# 将字典格式的转为json字符串

jsonData2 = {
    "result": [["卫衣女春2018", "8.092529385849389"], ["卫衣上衣春 春秋", "8.022499133719828"], ["卫衣 秋 女", "7.963854696462119"],
               ["卫衣2017女秋", "8.033525396543094"], ["卫衣不带帽子女", "8.036049751550866"], ["卫衣外套宽松女", "8.036109676892297"],
               ["卫衣女长袖宽松上衣", "8.016274388878704"], ["卫衣女春秋不收边", "8.056971186377892"], ["卫衣女长袖 秋薄", "8.048634073251334"],
               ["卫衣女2018 新", "8.064379456712274"]]}
# 字典格式
print(type(jsonData2))

# 将字典格式的数据转为了 str格式的
jsonStr2 = json.dumps(jsonData2)
print(jsonStr2)
print(type(jsonStr2))
