toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() => {
  'id': nodeId,
  'r': role,
  if (groupId != null) 'g': groupId,
  'ts': lastSeen,
  'h': hopCount,
  if (displayName != null) 'n': displayName,
  if (batteryLevel != null) 'bl': batteryLevel,
  if (hasInternetAccess) 'net': hasInternetAccess,
};