for example:
data = {'\u001b[31mKEY\u001b[0m': 'value'}
print(json.dumps(data))
Generated string will be escaped and color codes will be printed as is.
Even json.dumps(data, ensure_ascii=False) didn't help.
Note: I don't want to use any extra lib for json colorization.

Try (explanation in code comment):