Converts the list of T objects to JSON.
T
Returns:
@override List<Map<String, dynamic>>? toJSON() { return rawValue?.map((element) => element.toJSON()).toList(); }