Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ GetDoubleWithQuotes()

double System.Text.Json.Utf8JsonReader.GetDoubleWithQuotes ( )
inlinepackage

Definition at line 4302 of file Utf8JsonReader.cs.

4303 {
4304 ReadOnlySpan<byte> unescapedSpan = GetUnescapedSpan();
4305 if (JsonReaderHelper.TryGetFloatingPointConstant(unescapedSpan, out double value))
4306 {
4307 return value;
4308 }
4309 if (Utf8Parser.TryParse(unescapedSpan, out value, out int bytesConsumed, '\0') && unescapedSpan.Length == bytesConsumed && JsonHelpers.IsFinite(value))
4310 {
4311 return value;
4312 }
4313 throw ThrowHelper.GetFormatException(NumericType.Double);
4314 }
static bool TryParse(ReadOnlySpan< byte > source, out bool value, out int bytesConsumed, char standardFormat='\0')
ReadOnlySpan< byte > GetUnescapedSpan()

References System.Text.Json.Dictionary, System.Text.Json.ThrowHelper.GetFormatException(), System.Text.Json.Utf8JsonReader.GetUnescapedSpan(), System.Text.Json.JsonHelpers.IsFinite(), System.Text.Json.JsonReaderHelper.TryGetFloatingPointConstant(), System.Buffers.Text.Utf8Parser.TryParse(), and System.value.