Skip to content

Commit e162a5c

Browse files
committed
Update JsonDeserializer.cs
Fix for bug parsing an array of doubles. (Issue #373)
1 parent 9ee6d0e commit e162a5c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

RestSharp/Deserializers/JsonDeserializer.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,8 @@ private IList BuildList(Type type, object parent)
113113
{
114114
if (itemType.IsPrimitive)
115115
{
116-
var value = element.ToString();
117-
list.Add(value.ChangeType(itemType, Culture));
116+
var item = ConvertValue(itemType, element);
117+
list.Add(item);
118118
}
119119
else if (itemType == typeof(string))
120120
{
@@ -245,4 +245,4 @@ private object CreateAndMap(Type type, object element)
245245
return instance;
246246
}
247247
}
248-
}
248+
}

0 commit comments

Comments
 (0)