Python example code for converting objects into JSON strings

import json
#create object 
data = {
"name": "John",
"age": 30,
"city": "New York"
}
#convert objects to JSON character string 
json_data = json.dumps(data)
#engage in other businesses 
# some code