Beispiel #1
0
 internal override void WriteNumberWithCustomHandling(Utf8JsonWriter writer, float value, JsonNumberHandling handling)
 {
     if ((JsonNumberHandling.WriteAsString & handling) != 0)
     {
         writer.WriteNumberValueAsString(value);
     }
     else if ((JsonNumberHandling.AllowNamedFloatingPointLiterals & handling) != 0)
     {
         writer.WriteFloatingPointConstant(value);
     }
     else
     {
         writer.WriteNumberValue(value);
     }
 }