src/StarCitizen-API-Wrapper.Models/JsonConverters/Double/StringToDoubleConverter.cs
/// <summary>
/// Converts the json string value to double.
/// </summary>
Converts the json string value to double.
Converts the json string value to double .
public override double Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
        {
            if (double.TryParse(reader.GetString(), out var result))
                return result;
            result = reader.GetDouble();
            throw new JsonException($"Cannot convert string {reader.GetString()} to double {result}");
        }
public override double Read ( ref Utf8JsonReader reader , Type typeToConvert , JsonSerializerOptions options ) { if ( double . TryParse ( reader . GetString ( ) , out var result ) ) return result ; result = reader . GetDouble ( ) ; throw new JsonException ( $" Cannot convert string  { reader . GetString ( ) }  to double  { result } " ) ; }
Converts the json string value to double.
Converts the json string value to double .
Utf8JsonReader
ref
typeToConvert
Type
options
JsonSerializerOptions