mbraceproject / FsPickler

A fast multi-format message serializer for .NET
http://mbraceproject.github.io/FsPickler/
MIT License
324 stars 52 forks source link

Deserialisation of JSON null string #75

Closed roblenders closed 7 years ago

roblenders commented 7 years ago

In using your deserialiser I have found that when deserialising a JSON null value to a "string option" type the value returned is "Some(null)" instead of "None".

eiriktsarpalis commented 7 years ago

Could you please provide a detailed reproduction of this issue? In any case, the library has been designed to only work with FsPickler-to-FsPickler serialization roundtrips, deserialization of arbitrary json/xml formats cannot be guaranteed and usually results in exceptions.

roblenders commented 7 years ago

Apologies, upon attempting to reproduce the error I found that the problem was further upstream in my processing (the Some(null) value was already created). FsPickler correctly serialised and deserialised my erroneous value.