Skip to content

Commit

Permalink
Update F# documentation on including None (#1385)
Browse files Browse the repository at this point in the history
  • Loading branch information
MangelMaxime authored Jan 10, 2025
1 parent 8e634e4 commit 5309c00
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
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

0 comments on commit 5309c00

Please sign in to comment.