toJson method
Converts this graph to a JSON-compatible object.
Implementation
Map<String, Object?> toJson() => <String, Object?>{
'schema_version': okfGraphJsonSchemaVersion,
'nodes': nodes.map((node) => node.toJson()).toList(growable: false),
'edges': edges.map((edge) => edge.toJson()).toList(growable: false),
};