-Incremented version to 4.5.3

-Changed default DefaultContractResolver.IgnoreSerializableAttribute to true
-Fixed MaxDepth on JsonReader recursively throwing error
-Fixed SerializationBinder.BindToName not being called with full assembly names
This commit is contained in:
James Newton-King
2012-04-14 00:58:36 +12:00
parent 11310fdf05
commit adecef2126
11 changed files with 151 additions and 9 deletions
@@ -9,6 +9,7 @@ using NUnit.Framework;
#if !(SILVERLIGHT || NETFX_CORE || NET20)
using System.Runtime.Serialization.Json;
#endif
using Newtonsoft.Json.Serialization;
namespace Newtonsoft.Json.Tests.Serialization
{
@@ -39,7 +40,15 @@ namespace Newtonsoft.Json.Tests.Serialization
#endif
string expected = "{\"publicField\":\"public\",\"internalField\":\"internal\",\"protectedInternalField\":\"protected internal\",\"protectedField\":\"protected\",\"privateField\":\"private\"}";
string json = JsonConvert.SerializeObject(serializableType);
string json = JsonConvert.SerializeObject(serializableType, new JsonSerializerSettings
{
ContractResolver = new DefaultContractResolver
{
#if !(SILVERLIGHT || NETFX_CORE)
IgnoreSerializableAttribute = false
#endif
}
});
Assert.AreEqual(expected, json);
}