Open jabolopes opened 8 years ago
I wasn't really planning to do it myself but it should be easy to add (at least for message decoding), and would certainly increase compatibility with existing descriptors.
If you'd like to take a stab at it, I'd start by adding a function similar to decodeMessage
that also takes a default message argument... and use that instead of HashMap.empty
here: https://github.com/alphaHeavy/protobuf/blob/master/src/Data/ProtocolBuffers/Decode.hs#L40
Hi,
Do you have any plans to implement default values for optional fields?
Thanks, Jose