{"version":"1.0","type":"rich","title":"Gist 2768d4a5ea98e385b30ffc99390cddb7","description":"This example demonstrates a custom JSON encoder for serializing graph data structures. It shows how Python’s `json.JSONEncoder` is extended to convert `graph.Node` and `graph.Relationship` objects into a plain dictionary format, capturing element IDs, labels, properties, and relationship endpoints. The encoder uses `json.dumps` under the hood but overrides the `default` method to handle graph-specific types. The code relies on the `graph` module’s `Node` and `Relationship` classes, and its output is a JSON-friendly representation suitable for further visualization or data exchange.","provider_name":"VizHub AI Studio","provider_url":"https://next.vizhub.com","html":"<iframe src=\"https://next.vizhub.com/viz/gist-2768d4a5ea98e385b30ffc99390cddb7?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"1\"></iframe>","width":960,"height":500,"cache_age":3600}