import json


def replace_host_in_docs(manifest_json, new_host, old_host):
    """Replaces all the occurrences of the old_host in manifest_json with new_host.
    Args:
        manifest_json (dict): dict representation of the manifest.
        new_host (str): The new host that should appear in the manifest.
        old_host (str): The old host that currently appears in the manifest.

    Returns:
        dict: a new representation of the manifest with all occurrences of old_host replaced by
        new_host.
    """

    manifest_str = json.dumps(manifest_json)
    manifest_str = manifest_str.replace(old_host, new_host)
    manifest_json = json.loads(manifest_str)
    return manifest_json