toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() => {
      if (topic != null) 'topic': topic,
      if (pairingTopic != null) 'pairingTopic': pairingTopic,
      if (relay != null) 'relay': relay,
      if (expiry != null) 'expiry': expiry,
      if (acknowledged != null) 'acknowledged': acknowledged,
      if (controller != null) 'controller': controller,
      'namespaces': _namespaces(),
      if (requiredNamespaces != null)
        'requiredNamespaces': requiredNamespaces,
      if (optionalNamespaces != null)
        'optionalNamespaces': optionalNamespaces,
      'self': self?.toJson(),
      'peer': peer?.toJson(),
    };