toJson method
Implementation
Map<String, dynamic> toJson() {
return {
'id': id,
'name': name,
if (active != null) 'active': active,
if (createdAt != null) 'createdAt': createdAt?.toIso8601String(),
if (updatedAt != null) 'updatedAt': updatedAt?.toIso8601String(),
'nodes': nodes.map((node) => node.toJson()).toList(),
'connections': connections,
'settings': settings.toJson(),
if (staticData != null) 'staticData': staticData,
if (tags != null) 'tags': tags!.map((tag) => tag.toJson()).toList(),
if (shared != null) 'shared': shared!.map((s) => s.toJson()).toList(),
if (activeVersion != null) 'activeVersion': activeVersion!.toJson(),
};
}