getFieldsInSerializationOrder function
Returns an ordered list of fields to provide consistent serialization order.
Implementation
Iterable<NamedType> getFieldsInSerializationOrder(Class classDefinition) {
// This returns the fields in the order they are declared in the pigeon file.
return classDefinition.fields;
}