public object Deserialize(string content, Type type) { if (type.GetType() == typeof(Object)) return (Object)content; try { return JsonConvert.DeserializeObject(content, type); } catch (IOException e) { throw new ApiException(500, e.Message); } }