If you serialize the Decimal value, you will receive a Double value. Resolver, Formatter, IJsonFormatterResolver, IJsonFormatter<> seems to be used to solve this problem, but I don't know how to write it.I would like to ask for a solution if it is a sample or an example implementation.c# json .net-core
This test program will be helpful.
You will need to specify the type explicitly during the de-serialization.
The source of the question should be as follows:
<decimal> instead of
If you explicitly specify the type of variable in the class in the same test program description, it seems to work.
Thank you.I didn't know what would happen if the members had a Decimal instead of a simple Decimal, but it was helpful that you answered clearly.
I want to receive it anonymously, so I checked it with the code to receive the dummy arguments in generic and de-serialize them.
© 2022 OneMinuteCode. All rights reserved.