json data in python | read, write, and transfer

import json

data = [ { 'a' : 1, 'b' : 2, 'c' : 3, 'd' : 4, 'e' : 5 } ]

json = json.dumps(data)
print json



jsonData = '{"a":1,"b":2,"c":3,"d":4,"e":5}';

text = json.loads(jsonData)
print text


Config = json.load(open('config.json'))

json data in python | read, write, and transfer

https://karobben.github.io/2020/12/16/Python/json/

Author

Karobben

Posted on

2020-12-16

Updated on

2024-01-11

Licensed under

Comments