--

Hi Siavash , generally, there are two approaches:

As you mentioned, the first one is IL leaving(Fody, Metalama) or maybe Source Generators.

The second one is trying to customize the standard serializer or validation.

It depends on your use case ofc. To be honest, in 90% of use cases where I need something like you do, I prefer the second approach, e.g., adjusting serialization/validation for one specific property or property type.

--

--

Marek Sirkovský
Marek Sirkovský

No responses yet