-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to get the behaviour before breaking change #123 ? #138
Comments
While I understand this change I think the previous default was the sane behavior and having expectations like built in is wrong. So while I look into an replacement library, if any, it would be nice that the previous behaviour was at least an option. |
Yes, I see that this is a common request. I agree that we should add an option to have the previous behavior without needing IgnoreNullValues/DefaultIgnoreCondition. |
The new option SkippableOptionFields was added in v1.1 for this use case. https://github.com/Tarmil/FSharp.SystemTextJson/blob/master/docs/Customizing.md#skippable-option-fields |
🤩Thank you @Tarmil ! You're the best! |
While updating to release version, our CI hits the breaking change #123 :(
Is there a way to configure the old behaviour:
IgnoreNullValues = true or DefaultIgnoreCondition = WhenWritingNull affects serializing as well.
Am I missing a trick (without changing all option properties to Skippable)?
(Throwing an exception for missing non option record properties is pure gold, so allowNullFields would never be an option.)
If there isn't a way to get the old behaviour, would a configuration
optionFieldsSkippable
be considered an improvement to the library?The text was updated successfully, but these errors were encountered: