Fixed incorrect price conversion.

This commit is contained in:
mmuffins 2018-05-23 21:08:29 +02:00
parent 6f2eef8792
commit dd39c19c84

View File

@ -30,9 +30,8 @@ namespace SteamStorefrontAPI
{
public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
{
long longValue = long.Parse(reader.Value.ToString());
double convertedValue = longValue / 100.0;
return convertedValue;
var value = reader.Value.ToString();
return double.Parse(value.Insert(value.Length - 2, "."));
}
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)