toJson method

Map<String, Object?> toJson()

Encodes only fields that should be modified.

Implementation

Map<String, Object?> toJson() => {
  if (advertisedRoutes != null) 'advertisedRoutes': advertisedRoutes,
  if (acceptRoutes != null) 'acceptRoutes': acceptRoutes,
  if (shieldsUp != null) 'shieldsUp': shieldsUp,
  if (advertisedTags != null) 'advertisedTags': advertisedTags,
  if (wantRunning != null) 'wantRunning': wantRunning,
  if (autoUpdate != null) 'autoUpdate': autoUpdate,
  if (hostname != null) 'hostname': hostname,
  if (exitNodeId != null) 'exitNodeId': exitNodeId,
};