Skip to content
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

Update F# documentation on including None #1385

Merged
merged 1 commit into from
Jan 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Update F# documentation on including None
  • Loading branch information
MangelMaxime authored Jan 10, 2025
commit f55159ab7d991590b297ee4cb952786c350cf57c
4 changes: 2 additions & 2 deletions docs/mdsource/fsharp.source.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ VerifierSettings.AddExtraSettings(fun settings -> settings.AddFSharpConverters()
```


## NullValueHandling
## DefaultValueHandling

By default [DefaultValueHandling is Ignore](/docs/serializer-settings.md#default-settings). Since F# `Option.None` is treated as null, it will be ignored by default. To include `Option.None` use `VerifierSettings.AddExtraSettings` at module startup:

snippet: NullValueHandling
snippet: DefaultValueHandling


## Async Qwerks
Expand Down
4 changes: 2 additions & 2 deletions src/FSharpTests/Tests.fs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ open VerifyTests
open VerifyXunit
open Argon

// begin-snippet: NullValueHandling
VerifierSettings.AddExtraSettings(fun settings -> settings.NullValueHandling <- NullValueHandling.Include)
// begin-snippet: DefaultValueHandling
VerifierSettings.AddExtraSettings(fun settings -> settings.DefaultValueHandling <- DefaultValueHandling.Include)
// end-snippet

// begin-snippet: FsTest
Expand Down