The output of the function deserialize : string -> 'T can be controled with a type parameter. But sometimes, for instance as an ASP.NET Core TextInputFormatter, you only have an instance of System.Type to know the output's type.
I propose to have additional functions, besides deserialize… that additionally takes that System.Type as an argument. They could be named deserializeToType or something along those lines.
The changes to the code are fairly small, as the underlying serializer does already supports that szenario. I also already have an implementation lying around internally and would be willing to contribute this, if I get some advice on the naming of the functions/the API in general.
The output of the function
deserialize : string -> 'Tcan be controled with a type parameter. But sometimes, for instance as an ASP.NET Core TextInputFormatter, you only have an instance ofSystem.Typeto know the output's type.I propose to have additional functions, besides
deserialize…that additionally takes thatSystem.Typeas an argument. They could be nameddeserializeToTypeor something along those lines.The changes to the code are fairly small, as the underlying serializer does already supports that szenario. I also already have an implementation lying around internally and would be willing to contribute this, if I get some advice on the naming of the functions/the API in general.