Open ghost opened 6 years ago
I have the same issue with FeedHeader.Incrementality. Workaround?
Looks like this is the underlying issue: https://stackoverflow.com/questions/12295976/force-protobuf-net-to-serialize-all-default-values
@bugbiter @piotrwojtowicz Are you able to try this workaround in your code to see if it works?
Anyone found solution yet?
I will show it basing on FeedHeader serialization:
After serializing by ProtoBuf it seems that incrementality value (which is equal to 0) in FeedHeader class is not serialized, because when testing feed with https://github.com/CUTR-at-USF/gtfs-realtime-validator that validator shows me error "header incrementality not populated" and when I check (in that validator) protobuf file contents:
Same problem is i.e. with:
Check also attached file.
How to solve it? Can I control somehow which values should always be serialized even if they are null / zero / empty? I am using classess provided by Google: