-Fixed exception when loading JObject with multiple properties of the same name. Last property will be used
-Removed redundant ValidateObject method from JContainer
This commit is contained in:
@@ -1380,5 +1380,19 @@ Parameter name: arrayIndex")]
|
||||
|
||||
Assert.AreEqual(3, (int)o[key]);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void ParseMultipleProperties()
|
||||
{
|
||||
string json = @"{
|
||||
""Name"": ""Name1"",
|
||||
""Name"": ""Name2""
|
||||
}";
|
||||
|
||||
JObject o = JObject.Parse(json);
|
||||
string value = (string)o["Name"];
|
||||
|
||||
Assert.AreEqual("Name2", value);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user