jet / FsCodec

F# Event-Union Contract Encoding with versioning tolerant converters supporting System.Text.Json and Newtonsoft.Json
https://github.com/jet/dotnet-templates
Apache License 2.0
83 stars 19 forks source link

Enable relaxing of UnionEncoder requireRecordFields #62

Closed dharmaturtle closed 3 years ago

dharmaturtle commented 3 years ago

I only did Newtonsoft.Json so far because System.Text.Json is proving annoying. I'll elaborate further if you like what's here.

Ref: https://github.com/jet/FsCodec/issues/61

bartelink commented 3 years ago

because System.Text.Json is proving annoying

I know that feeling (and many around the world do!) 😄 see #59

bartelink commented 3 years ago

Thank you for the work thus far - this is looking very promising. Re #61, I had not done much thinking through / imagining of how this might look overall as your implementation is making me do now.

I covered some of these tradeoffs more in the code review comments; there may be things I've yet to consider which will prove some of the following wrong/unworkable, but my thoughts are:

There are multiple axes of constraints: