Tarmil / FSharp.SystemTextJson

System.Text.Json extensions for F# types
MIT License
329 stars 45 forks source link

FSharpLuLike should include WithUnionTagCaseInsensitive #190

Open cmeeren opened 4 weeks ago

cmeeren commented 4 weeks ago

I updated from Newtonsoft.Json/FSharpLu to FSharp.SystemTextJson with FSharpLuLike. This unfortunately bit us in production because one of our clients is sending incorrectly cased union cases that worked with FSharpLu but does not work with FSharpLuLike. Adding WithUnionTagCaseInsensitive after FSharpLuLike fixed it. So I guess WithUnionTagCaseInsensitive should be included in FSharpLuLike.

cmeeren commented 4 weeks ago

Actually, it's possible that our old API was generally case-insensitive and that FSharpLu's case-insensitive behavior was based on that. Haven't tested and won't spend time on it; it's not relevant to me now anyway. Just wanted to mention it.