Skip to content
This repository has been archived by the owner on Dec 24, 2022. It is now read-only.

Commit

Permalink
Merge pull request #495 from chriswebb/vs2015
Browse files Browse the repository at this point in the history
JsonObject helper class missing non-generic ConvertTo function overload
  • Loading branch information
mythz committed Apr 20, 2017
2 parents 6f863ed + e41901c commit 1c3fa0f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/ServiceStack.Text/JsonObject.cs
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,11 @@ private static bool IsJavaScriptNumber(string strValue)
}

public T ConvertTo<T>()
{
return (T)this.ConvertTo(typeof(T));
}

public object ConvertTo(Type type)
{
var map = new Dictionary<string, object>();

Expand All @@ -186,7 +191,7 @@ public T ConvertTo<T>()
map[entry.Key] = entry.Value;
}

return (T)map.FromObjectDictionary(typeof(T));
return map.FromObjectDictionary(type);
}
}

Expand Down

0 comments on commit 1c3fa0f

Please sign in to comment.