toJson method
Serialize to a JSON-encodable map, omitting absent members.
Implementation
Map<String, dynamic> toJson() => <String, dynamic>{
'resource': resource,
if (forgeId != null) 'forgeId': forgeId!,
'visibility': visibility.value,
'state': state.value,
'owners': owners,
'bootstrap': bootstrap.toJson(),
'sync': sync.toJson(),
};