Skip to content
This repository has been archived by the owner on Jan 10, 2023. It is now read-only.

Serialization Option fails #13

Open
2moveit opened this issue Dec 22, 2016 · 1 comment
Open

Serialization Option fails #13

2moveit opened this issue Dec 22, 2016 · 1 comment

Comments

@2moveit
Copy link

2moveit commented Dec 22, 2016

Hi, serialization with Newtonsoft.Json does not work.
If you serialize 2.0.ToOption() then it does not save the value:
{"OptionProperty":{"HasValue":true,"IsEmpty":false}}
Maybe it's possible to write a JsonConverter for that but the better way would be supporting serialization with the Option type by default. Or am I doing something wrong?

@2moveit 2moveit changed the title Deserialize Option fail Serialization Option fails Dec 23, 2016
@Bomret
Copy link
Owner

Bomret commented Dec 28, 2016

Hi @2moveit. No, you're not doing it wrong. I also would like to add generic serialization via the Serializable attribute and ISerializable interface but this is not available in the current compilation target (PCL Profile 328). I'd like to convert the whole project to .net core which supports those but would lose compatibility with .net 4.0. But I think it would be worth it.

@Bomret Bomret added this to the 4.0.0 milestone Dec 28, 2016
@Bomret Bomret removed this from the 4.0.0 milestone Nov 26, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants