-Added support for MS format JSON dates to ReadAsDateTime

-Fixed parsing certain JSON with comments into a JObject
-Tests
This commit is contained in:
James Newton-King
2014-03-01 18:31:01 +13:00
parent 0f77cd1b03
commit b43afdcc0a
12 changed files with 328 additions and 57 deletions
@@ -295,7 +295,11 @@ namespace Newtonsoft.Json.Tests.Serialization
() =>
{
JsonConvert.DeserializeObject<string[][]>(json,
new JsonSerializerSettings { PreserveReferencesHandling = PreserveReferencesHandling.All });
new JsonSerializerSettings
{
PreserveReferencesHandling = PreserveReferencesHandling.All,
SpecialPropertyHandling = SpecialPropertyHandling.Default
});
});
}
@@ -1063,7 +1067,10 @@ namespace Newtonsoft.Json.Tests.Serialization
ExceptionAssert.Throws<JsonSerializationException>(
"Error reading object reference '1'. Path 'Data.Prop2.MyProperty', line 9, position 20.",
() => JsonConvert.DeserializeObject<PropertyItemIsReferenceObject>(json));
() => JsonConvert.DeserializeObject<PropertyItemIsReferenceObject>(json, new JsonSerializerSettings
{
SpecialPropertyHandling = SpecialPropertyHandling.Default
}));
}
}