Custom Deserialization for a Specific Type (System.Version)

Hi @igobl

First, I think you should be able to get this done by registering a custom converter and and pass that in your own custom newtonsoft configuration that you can pass to the serializer API. I’m not certain though as I’m not that familiar with the newtonsoft serializer itself.

Second, may I ask how you are using System.Version? Might it be possible to use SemanticVersion from the NuGet.Versioning package? This also would allow versions like 1.2.3-alpha.4. You would still require a custom converted though as that gets serialized as:

{"Major":1,"Minor":2,"Patch":3,"ReleaseLabels":["alpha","4"],"Release":"alpha.4","IsPrerelease":true,"HasMetadata":false,"Metadata":""}