import json


def get_json_credentials(laika_object):
    """
    Returns parsed content of credentials file for a given report or result.
    """
    profile = laika_object.conf['profiles'][laika_object.profile]
    with open(profile['credentials']) as f:
        data = json.load(f)
    return data