Converts a ParticipantList instance into a JSON object.
Map<String, dynamic> toJson() => { "profileDetails": profileDetails?.toJson(), "messageId": messageId, "time": time, };