Object to Map serializer
@override Map<String, dynamic> toJson() { return { '@type': 'updateActiveNotifications', if (extra != null) '@extra': extra, 'groups': groups }; }