You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be convenient to have a helper that allows avoiding writing nulls into the output, as it can save large amounts of storage and data transfer. Also, some pre-existing data formats don't include the null fields, so it can be necessary to distinguish them. This approach seems to work but curious about your thoughts:
moduleCodec =letfieldOpt(fieldName:string)(picker:'u ->'t option)(fieldCodec:Codec<'t>):ObjectCodecFieldSet<'toption,'u>={
Values =fun i ->match i with| Some value ->[ fieldName, fieldCodec.Encoder value ]| None ->[]
Decoder = Decode.optional fieldName fieldCodec.Decoder
Picker = picker
}
The text was updated successfully, but these errors were encountered:
It would be convenient to have a helper that allows avoiding writing nulls into the output, as it can save large amounts of storage and data transfer. Also, some pre-existing data formats don't include the null fields, so it can be necessary to distinguish them. This approach seems to work but curious about your thoughts:
The text was updated successfully, but these errors were encountered: