JsonNumberHandling
Determines how JsonSerializer handles numbers when serializing and deserializing.
The behavior of WriteAsString and AllowNamedFloatingPointLiterals is not defined by the JSON specification. Altering the default number handling can potentially produce JSON that cannot be parsed by other JSON implementations.
namespace System.Text.Json.Serialization
{
[Flags]
public enum JsonNumberHandling
{
Strict = 0,
AllowReadingFromString = 1,
WriteAsString = 2,
AllowNamedFloatingPointLiterals = 4
}
}