You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've found an issue where a null value in an 'exotic' type from a third party library doesn't get deserialized correctly due to the settings for Json.NET.
Check out the addition of NullValueHandling = NullValueHandling.Ignore to the JsonSerializerAdapter constructor. This fixes the issue in the corresponding test.
The simple fix is to add the fix to mainline. Would this be possible, @rofr ?
The 'right' fix would be to allow specifying serialization settings but this non-trivial as far as I can see.
The text was updated successfully, but these errors were encountered:
If Ignore is the sensible default, then we should go with that for sure. And it seems that this indeed is the case. If I understand correctly, null members won't be written upon serialization and then just keep defaults when being deserialized. So deserialized objects will have the same properties, use less space in the journal and marginally incur less I/O.
So the fix is trivial (one-liner) but a potential PR should include a simpler test. Feel free to have a go if you wish!
Supplying custom settings is doable, we have a pattern for this. But let's save that for later as the config api isn't frozen yet.
I've found an issue where a null value in an 'exotic' type from a third party library doesn't get deserialized correctly due to the settings for Json.NET.
I've posted a spike to my fork:
https://github.com/Simcon/memstate/commit/71870e91aad95a5a3d23bf6803b5b47b56c87501
Check out the addition of
NullValueHandling = NullValueHandling.Ignore
to the JsonSerializerAdapter constructor. This fixes the issue in the corresponding test.The simple fix is to add the fix to mainline. Would this be possible, @rofr ?
The 'right' fix would be to allow specifying serialization settings but this non-trivial as far as I can see.
The text was updated successfully, but these errors were encountered: