小编Mad*_*dhu的帖子

How to get JSON.loads() output in dictionary type but not string type using PYTHON

When I make use of JSON.dump() I am getting below JSON format

Dumps data"b'{\"AutomaticReadabilityIndex\":2.7999999999999994,\"AgeLevel\":[\" 11 to 12\"],\"Statement\":[\"Nice. Your grade is about six\"],\"SpacheScore\":1.877,\"GunningFogScore\":9.099999999999998,\"SmogIndex\":5.999999999999999}'"
Run Code Online (Sandbox Code Playgroud)

When I make use of JSON.loads() I am getting below JSON format with bytes

loads data b'{"AutomaticReadabilityIndex":2.7999999999999994,"AgeLevel":[" 11 to 12"],"Statement":["Nice. Your grade is about six"],"SpacheScore":1.877,"GunningFogScore":9.099999999999998,"SmogIndex":5.999999999999999}'
Run Code Online (Sandbox Code Playgroud)

My question is when I am using loads format the output has to be in dictionary type but I don't know why I am getting string type as my output. How to convert …

json python-3.x python-requests python-responses

5
推荐指数
1
解决办法
8658
查看次数