<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def save_config(path, config):
 """Save a config object to a JSON file."""

    import json
    config['version'] = 1
    with open(path, 'w') as f:
        json.dump(config, f)