Skip to content

Commit 58912be

Browse files
committed
Fixed indentations
1 parent 3a06bf0 commit 58912be

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

RestSharp/Deserializers/JsonDeserializer.cs

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -83,18 +83,19 @@ private void Map(object target, IDictionary<string, object> data)
8383
{
8484
name = prop.Name;
8585
}
86-
87-
var parts = name.Split('.');
88-
var currentData = data;
89-
object value = null;
90-
for (var i = 0; i < parts.Length; ++i)
91-
{
92-
var actualName = parts[i].GetNameVariants(Culture).FirstOrDefault(currentData.ContainsKey);
93-
if (actualName == null) break;
94-
if(i == parts.Length - 1) value = currentData[actualName];
95-
else currentData = (IDictionary<string, object>)currentData[actualName];
96-
}
97-
if(value != null) prop.SetValue(target, ConvertValue(type, value), null);
86+
87+
var parts = name.Split('.');
88+
var currentData = data;
89+
object value = null;
90+
for (var i = 0; i < parts.Length; ++i)
91+
{
92+
var actualName = parts[i].GetNameVariants(Culture).FirstOrDefault(currentData.ContainsKey);
93+
if (actualName == null) break;
94+
if(i == parts.Length - 1) value = currentData[actualName];
95+
else currentData = (IDictionary<string, object>)currentData[actualName];
96+
}
97+
98+
if(value != null) prop.SetValue(target, ConvertValue(type, value), null);
9899
}
99100
}
100101

@@ -106,17 +107,16 @@ private IDictionary BuildDictionary(Type type, object parent)
106107
{
107108
var key = child.Key;
108109
object item = null;
109-
if (valueType.IsGenericType && valueType.GetGenericTypeDefinition() == typeof(List<>))
110+
if (valueType.IsGenericType && valueType.GetGenericTypeDefinition() == typeof(List<>))
110111
{
111-
item = BuildList(valueType, child.Value);
112+
item = BuildList(valueType, child.Value);
112113
}
113114
else
114115
{
115-
item = ConvertValue(valueType, child.Value);
116+
item = ConvertValue(valueType, child.Value);
116117
}
117118
dict.Add(key, item);
118119
}
119-
120120
return dict;
121121
}
122122

0 commit comments

Comments
 (0)