-
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
WithUnwrapOption(false) still serializes None as null #171
Comments
Could this be related to |
Yes, it is on purpose that None and ValueNone are serialized as null. I am open to adding an option to customize this though! |
Would be great! I am not serializing for idiomatic JSON, but for displaying structures of F# data (in a better way than |
Note by the way that the docs for FSharp.SystemTextJson/src/FSharp.SystemTextJson/Options.fs Lines 368 to 372 in 4869244
It says that if set, Also relevant here: FSharp.SystemTextJson/src/FSharp.SystemTextJson/Options.fs Lines 56 to 59 in 4869244
|
Hi! Just wondering if it would be possible to implement this soon-ish (say, during the coming week or two)? I need to decide whether to work around this, but the point is moot if this could be supported upstream. 🙂
By the way, |
When using
WithUnwrapOption(false)
,None
still serializes tonull
.(I am serializing for logging/assertion/debugging purposes and want
None
/ValueNone
to serialize to the strings"None"
/"ValueNone"
, as I expect is the intended functionality withWithUnwrapOption(false)
.)This fails with:
The text was updated successfully, but these errors were encountered: