Skip to content

Add functions taking a System.Type instead of a type parameter #45

Description

@ChrSteinert

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions