def json_set_value(json, path, value):
    """
    Set the value at the specified json path.

    Create the path if it don't exists.

    json: json document
    path: a list of keys
    value: value to be set
    """
    crt = json
    for name in path[:-1]:
        if name not in crt:
            crt[name] = {}
        crt = crt[name]
    crt[path[-1]] = value
