toJson method
Implementation
Map<String, Object?> toJson() => {
'environmentIncarnation': environmentIncarnation,
'threadId': threadId,
'threadGeneration': threadGeneration,
'functions': functions,
'scopes': scopes.map((item) => item.wire).toList(),
if (lifetimeSeconds != null) 'lifetimeSeconds': lifetimeSeconds,
};