import json
from pprint import pprint


def pretty_print_peeringdb_dump(file_path):
    try:
        with open(file_path, "r", encoding="utf-8") as file:
            data = json.load(file)
        print("Pretty-printed PeeringDB dump:")
        pprint(data, depth=2, compact=True)
    except FileNotFoundError:
        print(f"Error: The file {file_path} does not exist.")
    except json.JSONDecodeError:
        print(f"Error: The file {file_path} is not a valid JSON file.")


# Example usage:
pretty_print_peeringdb_dump("./data/peeringdb_2_dump_2026_01_01.json")
