-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:
JamesNK
2009-10-03 04:33:15 +00:00
parent 33ac3a9c44
commit be8d951c03
6 changed files with 31 additions and 54 deletions
@@ -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);
}
}
}