import json


def split_header(curl_output):
    """
    Splits the header and the json output from a curl call.

    Args:
        curl_output (str): output from curl call.

    Returns:
        tuple: tuple of header string and json.
    """

    # json content starts at the first open square bracket
    json_start_idx = curl_output.find("[")
    # convert string to json
    actual_json = json.loads(curl_output[json_start_idx:])

    return curl_output[:json_start_idx], actual_json