Map<String, dynamic> toJson() { return { 'pseudoType': pseudoType.toJson(), 'matches': matches.map((e) => e.toJson()).toList(), if (pseudoIdentifier != null) 'pseudoIdentifier': pseudoIdentifier, }; }