Easy and quick way to generate valid escape-charactered JSON for AppleScripts.

Open up Python and type in your JSON as a dictionary:

dictionary = {
    "BTTTouchBarButtonName": "Button",
    "BTTTriggerConfig": {
        "BTTTouchBarFontColor": "110.000000, 193.000000, 56.000000, 255.000000"
    },
}

Then simply json.dumps it twice:

import json
output = json.dumps(json.dumps(dictionary))
print(output)

You will see the output is the following:

"{\"BTTTouchBarButtonName\": \"Latest\", \"BTTTriggerConfig\": {\"BTTTouchBarFontColor\": \"110.000000, 193.000000, 56.000000, 255.000000\"}}"

Saves quite a bit of time if you are working with large layout modifications, and ensures you don't make small mistakes. Technique works for Python 2 (system-installed) and Python 3.