1. The text came from str(dict) or print
Python prints dicts with single quotes and True, False and None, none of which are JSON. Write JSON with json.dumps, and if you're stuck with dict text from somewhere else, ast.literal_eval reads it safely.
import ast
import json
text = "{'id': 7, 'active': True, 'manager': None}"
data = ast.literal_eval(text) # reads Python literal syntax safely
print(json.dumps(data)) # {"id": 7, "active": true, "manager": null}