diff --git a/Src/Newtonsoft.Json.Tests/Converters/DataSetConverterTests.cs b/Src/Newtonsoft.Json.Tests/Converters/DataSetConverterTests.cs index 091cdd06..cda7decb 100644 --- a/Src/Newtonsoft.Json.Tests/Converters/DataSetConverterTests.cs +++ b/Src/Newtonsoft.Json.Tests/Converters/DataSetConverterTests.cs @@ -133,7 +133,7 @@ namespace Newtonsoft.Json.Tests.Converters [Test] public void SerializeNullRoot() { - string json = JsonConvert.SerializeObject(null, new JsonSerializerSettings + string json = JsonConvert.SerializeObject(null, typeof(DataSet), new JsonSerializerSettings { Formatting = Formatting.Indented }); diff --git a/Src/Newtonsoft.Json.Tests/Converters/DataTableConverterTests.cs b/Src/Newtonsoft.Json.Tests/Converters/DataTableConverterTests.cs index 30560baf..0a22a17d 100644 --- a/Src/Newtonsoft.Json.Tests/Converters/DataTableConverterTests.cs +++ b/Src/Newtonsoft.Json.Tests/Converters/DataTableConverterTests.cs @@ -481,7 +481,7 @@ namespace Newtonsoft.Json.Tests.Converters [Test] public void SerializeNullRoot() { - string json = JsonConvert.SerializeObject(null, new JsonSerializerSettings + string json = JsonConvert.SerializeObject(null, typeof(DataTable), new JsonSerializerSettings { Formatting = Formatting.Indented }); diff --git a/Src/Newtonsoft.Json.Tests/Serialization/TypeNameHandlingTests.cs b/Src/Newtonsoft.Json.Tests/Serialization/TypeNameHandlingTests.cs index 3b0f4870..f9d7a1c6 100644 --- a/Src/Newtonsoft.Json.Tests/Serialization/TypeNameHandlingTests.cs +++ b/Src/Newtonsoft.Json.Tests/Serialization/TypeNameHandlingTests.cs @@ -248,7 +248,7 @@ namespace Newtonsoft.Json.Tests.Serialization [Test] public void SerializeRootTypeNameAutoWithJsonConvert_Generic() { - string json = JsonConvert.SerializeObject(new WagePerson(), Formatting.Indented, new JsonSerializerSettings + string json = JsonConvert.SerializeObject(new WagePerson(), typeof(object), Formatting.Indented, new JsonSerializerSettings { TypeNameHandling = TypeNameHandling.Auto }); @@ -265,7 +265,7 @@ namespace Newtonsoft.Json.Tests.Serialization [Test] public void SerializeRootTypeNameAutoWithJsonConvert_Generic2() { - string json = JsonConvert.SerializeObject(new WagePerson(), new JsonSerializerSettings + string json = JsonConvert.SerializeObject(new WagePerson(), typeof(object), new JsonSerializerSettings { TypeNameHandling = TypeNameHandling.Auto }); diff --git a/Src/Newtonsoft.Json/JsonConvert.cs b/Src/Newtonsoft.Json/JsonConvert.cs index 59ddf658..bc95a19b 100644 --- a/Src/Newtonsoft.Json/JsonConvert.cs +++ b/Src/Newtonsoft.Json/JsonConvert.cs @@ -530,17 +530,6 @@ namespace Newtonsoft.Json return SerializeObject(value, null, (JsonSerializerSettings)null); } - /// - /// Serializes the specified object to a JSON string. - /// - /// The type of the object to serialize. - /// The object to serialize. - /// A JSON string representation of the object. - public static string SerializeObject(object value) - { - return SerializeObject(value, typeof(T), (JsonSerializerSettings)null); - } - /// /// Serializes the specified object to a JSON string using formatting. /// @@ -554,20 +543,6 @@ namespace Newtonsoft.Json return SerializeObject(value, formatting, (JsonSerializerSettings)null); } - /// - /// Serializes the specified object to a JSON string using formatting. - /// - /// The type of the object to serialize. - /// The object to serialize. - /// Indicates how the output is formatted. - /// - /// A JSON string representation of the object. - /// - public static string SerializeObject(object value, Formatting formatting) - { - return SerializeObject(value, typeof(T), (JsonSerializerSettings)null); - } - /// /// Serializes the specified object to a JSON string using a collection of . /// @@ -613,21 +588,6 @@ namespace Newtonsoft.Json return SerializeObject(value, null, settings); } - /// - /// Serializes the specified object to a JSON string using . - /// - /// The type of the object to serialize. - /// The object to serialize. - /// The used to serialize the object. - /// If this is null, default serialization settings will be used. - /// - /// A JSON string representation of the object. - /// - public static string SerializeObject(T value, JsonSerializerSettings settings) - { - return SerializeObject(value, typeof(T), settings); - } - /// /// Serializes the specified object to a JSON string using a type, formatting and . /// @@ -664,22 +624,6 @@ namespace Newtonsoft.Json return SerializeObject(value, null, formatting, settings); } - /// - /// Serializes the specified object to a JSON string using formatting and . - /// - /// The type of the object to serialize. - /// The object to serialize. - /// Indicates how the output is formatted. - /// The used to serialize the object. - /// If this is null, default serialization settings will be used. - /// - /// A JSON string representation of the object. - /// - public static string SerializeObject(T value, Formatting formatting, JsonSerializerSettings settings) - { - return SerializeObject(value, typeof(T), formatting, settings); - } - /// /// Serializes the specified object to a JSON string using a type, formatting and . ///