Most serializer functions for IDL defined types accept both a field name and the BSONObjBuilder. This does not currently apply when the BSON serialization type consists of a list of primitive types. Example
The serializer function for this IDL type accepts a single BSONObjectBuilder parameter. It would be more consistent if we could amend the contract so that the IDL generated code passes two function parameters to this serializer. This issue is more apparent when converting the bson_serialization_type field from any to a list of basic types.