Using JSON Data in Python
Breaking string data into dictionary object and viceversa using json library data='{"bookno":"1234","title":"C Programming","author":"Dr B P Sharma","price":"340"}' import json # converting string to dictionary object b=json.loads(data) print(b['bookno']) # converting a dictionary in string json.dumps(b) Working with Single JSON Record Create a JSON file as book.json and place the following record into that file {"bookno":"1234","title":"C Programming","author":"Dr B P Sharma","price":"340"} Create Python File to read the data as readbook.py import json f=open("book.json") data=f.read() d=json.loads(data) for k,v in d.items(): print(k,"=",v) Output bookno = 1234 title = C Programming author = Dr B P Sharma price = 340 Working with Multiple JSON...