Preserving Non‑JSON‑Serializable Attributes in NetworkX JSON Serialization
When migrating a small NetworkX application to a newer version without downtime, the JSON serialization helpers (`node_link_data`/`node_link_graph`) must retain all node and edge attributes. However, the current API only preserves attributes that are JSON‑serializable; custom Python objects, lambdas, or mutable structures are omitted, and the format of the J