I have a string that is not legal to use for json.dump() and I need to edit it. I need to replace the numbers into the string from 0:
to "0:"
for esxample. Same for 1
and the other numbers that follow.
This string changes from time to time and the numbers can change as well
{"aclList": {0: {"sequence": {1: {"counterData": …etc etc
Must become:
{"aclList": {"0": {"sequence": {"1": {"counterData": …etc etc
I believe I need to find \d:
and replace the match with himself plus the qoutes ""