git.iko.soy/rowtype-yoga/purescript-protobuf
on master help sign in
Update README.md
commit4c6f5a4d662138f5c8a66682d13e39b2aead5688 authorJames Brock <jamesbrock@gmail.com> dateSun 30 May 2021, 21:46 (5 years ago) parentebb6f6a
1 file changed+6−4
README.md+6−4
README.md+6−4
@@ -265,10 +265,12 @@ in our implementation.
265265
266266#### When deserializing
267267
268−The generated record fields will always be `Nothing` when a field is not present on the wire.
269−If we want to use
270−[default values](https://developers.google.com/protocol-buffers/docs/proto3?hl=en#default) then
271−we have the `Protobuf.Library.Default` typeclass for that.
268+A message field will always be `Just` when a field is present on the wire.
269+A message field will always be `Nothing` when a field is not present on the wire, even if
270+its a *no presence* field.
271+If we want interpret a missing *no presence* field as a
272+[default value](https://developers.google.com/protocol-buffers/docs/proto3?hl=en#default) then
273+we have the `Protobuf.Library.toDefault` function for that.
272274
273275#### When serializing
274276