import json


def get_connection_string(credential_path):
    """Converts credentials JSON to a connection string."""

    with open(credential_path) as file_ptr:
        credential_dict = json.load(file_ptr)

    connection_string = credential_dict['connection_string']

    full_connection_string = connection_string.format(
        user=credential_dict['user'],
        password=credential_dict['password']
    )

    return full_connection_string