diff --git a/Src/Newtonsoft.Json/JsonConvert.cs b/Src/Newtonsoft.Json/JsonConvert.cs index 59ddf658..517f6e54 100644 --- a/Src/Newtonsoft.Json/JsonConvert.cs +++ b/Src/Newtonsoft.Json/JsonConvert.cs @@ -536,7 +536,7 @@ namespace Newtonsoft.Json /// The type of the object to serialize. /// The object to serialize. /// A JSON string representation of the object. - public static string SerializeObject(object value) + public static string SerializeObject(T value) { return SerializeObject(value, typeof(T), (JsonSerializerSettings)null); } @@ -563,9 +563,9 @@ namespace Newtonsoft.Json /// /// A JSON string representation of the object. /// - public static string SerializeObject(object value, Formatting formatting) + public static string SerializeObject(T value, Formatting formatting) { - return SerializeObject(value, typeof(T), (JsonSerializerSettings)null); + return SerializeObject(value, typeof(T), formatting, (JsonSerializerSettings)null); } ///