This commit is contained in:
James Newton-King
2015-12-09 13:03:56 +13:00
parent 2c7a51c50a
commit eec87d257d
+3 -3
View File
@@ -536,7 +536,7 @@ namespace Newtonsoft.Json
/// <typeparam name="T">The type of the object to serialize.</typeparam> /// <typeparam name="T">The type of the object to serialize.</typeparam>
/// <param name="value">The object to serialize.</param> /// <param name="value">The object to serialize.</param>
/// <returns>A JSON string representation of the object.</returns> /// <returns>A JSON string representation of the object.</returns>
public static string SerializeObject<T>(object value) public static string SerializeObject<T>(T value)
{ {
return SerializeObject(value, typeof(T), (JsonSerializerSettings)null); return SerializeObject(value, typeof(T), (JsonSerializerSettings)null);
} }
@@ -563,9 +563,9 @@ namespace Newtonsoft.Json
/// <returns> /// <returns>
/// A JSON string representation of the object. /// A JSON string representation of the object.
/// </returns> /// </returns>
public static string SerializeObject<T>(object value, Formatting formatting) public static string SerializeObject<T>(T value, Formatting formatting)
{ {
return SerializeObject(value, typeof(T), (JsonSerializerSettings)null); return SerializeObject(value, typeof(T), formatting, (JsonSerializerSettings)null);
} }
/// <summary> /// <summary>