import json


def _test_json_result(result, expected):
    """Compare the JSON test results with an expected value.

    Parameters
    ----------
    result: str
        The result of running the test.
    expected: str
        The expected outcome.

    Returns
    -------
    bool
        Whether the result matches the expectations or not.

    """

    result_dict = json.loads(result)
    expected_dict = json.loads(expected)
    return result_dict == expected_dict