-XML documentation
-Removed generic serialize methods
This commit is contained in:
James Newton-King
2013-03-24 14:49:54 +13:00
parent c4d375dd69
commit 787bde6e15
14 changed files with 185 additions and 51 deletions
@@ -318,8 +318,10 @@ namespace Newtonsoft.Json.Tests.Serialization
// Verify contract is properly finding our callback
var resolver = new DefaultContractResolver().ResolveContract(typeof(FooEvent));
#pragma warning disable 612,618
Debug.Assert(resolver.OnError != null);
Debug.Assert(resolver.OnError == typeof(FooEvent).GetMethod("OnError", BindingFlags.Instance | BindingFlags.NonPublic));
#pragma warning restore 612,618
var serializer = JsonSerializer.Create(new JsonSerializerSettings
{
@@ -79,7 +79,7 @@ namespace Newtonsoft.Json.Tests.Serialization
TypeNameHandling = TypeNameHandling.Auto
};
var sw = new StringWriter();
serializer.Serialize<Person>(new JsonTextWriter(sw) { Formatting = Formatting.Indented }, new WagePerson());
serializer.Serialize(new JsonTextWriter(sw) { Formatting = Formatting.Indented }, new WagePerson(), typeof(Person));
var result = sw.ToString();
Assert.AreEqual(@"{
@@ -102,7 +102,7 @@ namespace Newtonsoft.Json.Tests.Serialization
[Test]
public void SerializeRootTypeNameAutoWithJsonConvert()
{
string json = JsonConvert.SerializeObject<object>(new WagePerson(), Formatting.Indented, new JsonSerializerSettings
string json = JsonConvert.SerializeObject(new WagePerson(), typeof(object), Formatting.Indented, new JsonSerializerSettings
{
TypeNameHandling = TypeNameHandling.Auto
});