This repository has been archived by the owner on Nov 8, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 32
Thoth.Json: allow decoding of classes when value is null #132
Comments
0x53A
changed the title
Thoth.Json: allow decoding of classes
Thoth.Json: allow decoding of classes when value is null
Mar 16, 2019
So I think this would be solved by the new extra/custom serializers in Thoth.Json 3, but I couldn't yet update because of the breaking changes:
|
I changed it to As long as the value sent from the server is None, it correctly deserializes. |
Indeed, when using |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I am using Fable Elmish React with ServerSideRendering.
My Model contains a mutable
System.Collections.Generic.Dictionary
as a cache.On deserialization of the model I get an exception:
When I render the page on the server, I set the cache to
null
.I haven't looked at the code of Thoth yet, but what would you think about emiting a special decoder that only accepts null when encountering an unknown class type?
The text was updated successfully, but these errors were encountered: