diff --git a/TShockAPI/Rest/RestObject.cs b/TShockAPI/Rest/RestObject.cs index fcc21e6a..eb0631d9 100644 --- a/TShockAPI/Rest/RestObject.cs +++ b/TShockAPI/Rest/RestObject.cs @@ -4,21 +4,21 @@ using System.Collections.Generic; namespace Rests { [Serializable] - public class RestObject : Dictionary + public class RestObject : Dictionary { public string Status { - get { return this["status"]; } + get { return this["status"] as string; } set { this["status"] = value; } } public string Error { - get { return this["error"]; } + get { return this["error"] as string; } set { this["error"] = value; } } public string Response { - get { return this["response"]; } + get { return this["response"] as string; } set { this["response"] = value; } } @@ -33,11 +33,11 @@ namespace Rests /// /// /// Returns null if key does not exist. - public new string this[string key] + public new object this[string key] { get { - string ret; + object ret; if (TryGetValue(key, out ret)) return ret; return null;