Closed ddickstein closed 1 year ago
The last bullet in the docs on maps reads:
If you provide a key but no value for a map field, the behavior when the field is serialized is language-dependent. In C++, Java, Kotlin, and Python the default value for the type is serialized, while in other languages nothing is serialized.
I think this doesn't apply to the JSON encoding because I don't think there's a way to provide a key without a value in JSON, but if that's incorrect then we may need to do something here.
In the process, also add support for encoding and decoding unsigned values. The previous logic in
field_pattern_match
for decoding uint32 and uint64 wasn't valid, but that probably wasn't detected before since the encoder failed due to it being unsupported.