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}'"
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}'
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 this JSON string into dictionary type.
Loads Data Type : type of loads <class 'str'>
When I trying to parse string type JSON directly I am getting below error
ERROR : Traceback (most recent call last):
File "Db.py", line 84, in <module>
print(par['GunningFogScore'])
TypeError: string indices must be integers