This function compares the fields in the data with a list of expected fields and warns if there are any unexpected fields.
checkUnexpectedFields(data, expected_fields, class_name, context = NULL)Invisibly returns a character vector of unexpected field names
The data structure to check
A character vector of expected field names
The name of the class being populated
Optional context information for the warning message