FSharp.Json
FSharp.Json copied to clipboard
Serialize Map<string, string option> raises "Object reference not set to an instance of an object."
Hello! Currently, I'm trying to serialize this scenario but it raises an error:
type Example = Map<string, string option>
let example: Example = Map.empty
example
|> Map.add "p" None
|> Json.serialize // "Object reference not set to an instance of an object."
When I step with the debugger I see:
I guess F# interprets a value of type option as null in maps and it throws?