Currently the native code generators for data class serialization always write all of their fields, even when null. This seems wasteful, since it means we're encoding and decoding string values and null values, and then sending them across the channel, rather than just omitting them. It looks like currently the Dart code is just doing lookups and checking against null, so currently I don't think there would be a behavioral difference if we omitted them instead.
If we change this we should change it across all generators, just to make sure we don't accidentally include subtle behavioral differences that could confuse us later.
@gaaclarke Is there a reason it was written this way? I don't see any reason to send explicit nulls, but I could certainly be missing something.
Currently the native code generators for data class serialization always write all of their fields, even when null. This seems wasteful, since it means we're encoding and decoding string values and null values, and then sending them across the channel, rather than just omitting them. It looks like currently the Dart code is just doing lookups and checking against null, so currently I don't think there would be a behavioral difference if we omitted them instead.
If we change this we should change it across all generators, just to make sure we don't accidentally include subtle behavioral differences that could confuse us later.
@gaaclarke Is there a reason it was written this way? I don't see any reason to send explicit nulls, but I could certainly be missing something.