-Added JsonDictionaryAttribute

-Added JsonContainerContract
-Added support for customizing the JsonConverter, type name handling, reference handling of collection items
This commit is contained in:
James Newton-King
2012-04-22 23:17:58 +12:00
parent 450996eb25
commit 7b776e9298
34 changed files with 894 additions and 252 deletions
@@ -1016,7 +1016,7 @@ keyword such as type of business.""
public void IncompatibleJsonAttributeShouldThrow()
{
ExceptionAssert.Throws<JsonSerializationException>(
"JsonConverter IsoDateTimeConverter on Newtonsoft.Json.Tests.TestObjects.IncompatibleJsonAttributeClass is not compatible with member type IncompatibleJsonAttributeClass.",
"Unexpected value when converting date. Expected DateTime or DateTimeOffset, got Newtonsoft.Json.Tests.TestObjects.IncompatibleJsonAttributeClass.",
() =>
{
IncompatibleJsonAttributeClass c = new IncompatibleJsonAttributeClass();
@@ -6193,4 +6193,15 @@ Parameter name: value",
}
}
#endif
[JsonObject(MemberSerialization.OptIn)]
public class TestComponentSimple
{
[JsonProperty]
public int MyProperty { get; set; }
public TestComponentSimple()
{
}
}
}