def METHOD_NAME(self, obj):
    """recursively hash or reveal refs and convert obj to json and write to file"""
    indent = self.kwargs.get("indent", 2)
    reveal = self.kwargs.get("reveal", False)
    target_name = self.kwargs.get("target_name", None)
    if reveal:
        obj = self.revealer.reveal_obj(obj)
    else:
        obj = self.revealer.compile_obj(obj, target_name=target_name)
    if obj:
        json.dump(obj, self.fp, indent=indent)
        logger.debug("Wrote %s", self.fp.name)
    else:
        logger.debug("%s is Empty, skipped writing output", self.fp.name)