human
List of objects to JSON with Python
assistant
Here is some code to convert a list of objects `list_name` to json string `json_string`

json_string = json.dumps([ob.__dict__ for ob in list_name])

#Warning: this code generation is experimental. Please inspect the code for any bugs before executing.