Reputation: 95
i'm receiving a string in json format. It is str format, like this:
'{"name":"Jason", "age":"10"}'
I want to transform it in a "normal" string, exactly like this:
Jason 10
Upvotes: 0
Views: 70
Reputation: 30258
You can use the json module to do this:
json
import json data = json.loads(json_str) print(data['name'], data['age'])
Upvotes: 1