Missing value/null support for scalar value types in proto 3 · Issue #1606 · protocolbuffers/protobuf
From the protobuf wire format we can tell whether a specific field exists or not. And in protobuf 2 generated code, all fields have a "HasXXX" method to tell whether the field exists or not in code...
GitHub