def match_benchmark(json, benchmark):
    """Checks the json db_instances matches the benchmark object."""

    # Check the benchmark has an id
    assert 'id' in json and type(json['id']) is str
    assert json['id'] == str(benchmark.id)

    # Check the benchmark has a docker_image
    assert 'docker_image' in json and type(json['docker_image']) is str
    assert json['docker_image'] == benchmark.docker_image

    # Check the benchmark has a docker_tag
    assert 'docker_tag' in json and type(json['docker_tag']) is str
    assert json['docker_tag'] == benchmark.docker_tag

    # Check the benchmark has a description
    if 'description' in json:
        assert type(json['description']) is str
        assert json['description'] == benchmark.description

    # Check the benchmark has a json_schema
    assert 'json_schema' in json and type(json['json_schema']) is dict
    assert json['json_schema'] == benchmark.json_schema

    return True