-Fixed error in JTokenWriter when disposing after adding a duplicate property
-Fixed not validating JSON when deserializing with DataTableConverter
This commit is contained in:
@@ -7892,6 +7892,18 @@ Parameter name: value",
|
||||
}
|
||||
#endif
|
||||
|
||||
[Test]
|
||||
public void DuplicatePropertiesInNestedObject()
|
||||
{
|
||||
ExceptionAssert.Throws<ArgumentException>(
|
||||
"Can not add property time to Newtonsoft.Json.Linq.JObject. Property with the same name already exists on object.",
|
||||
() =>
|
||||
{
|
||||
string content = @"{""result"":{""time"":1408188592,""time"":1408188593},""error"":null,""id"":""1""}";
|
||||
JsonConvert.DeserializeObject<JObject>(content);
|
||||
});
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void RoundtripUriOriginalString()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user