json = '''{
    "a": {
        "x":1,
        "y":2
    },
    "b": {
        "z":3,
        "w":4
    }
    "c": [1, 2, 3]
}'''

import re
better_json = re.sub(r'^((\s*)".*?":)\s*([\[{])', r'\1\n\2\3', json, flags=re.MULTILINE)
print(better_json)