NetworkX JSON Graph Serialization: Preserving Custom Attribute Types
Goal: Ensure that after loading a graph backup stored in JSON format, all node and edge attributes retain their original Python types (e.g., tuples, nested dictionaries, custom objects) without manual post‑processing. Constraint: NetworkX’s built‑in JSON functions (json_graph.node_link_data and node_link_graph) only serialize values that are native JSON type