def METHOD_NAME(obj: Any, params: List[str]) -> bool:
    assert len(params) in (0, 2)
    if not isinstance(obj, dict):
        return False
    if params:
        assert params[0] in (
            "str",
            "Any",
        ), "Only string keys are allowed for json dicts."
        for v in obj.values():
            if not _validate_object(v, params[1]):
                return False
    return True