-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
-11
View File
@@ -118,17 +118,6 @@ namespace Newtonsoft.Json.Linq
return new JConstructor(this);
}
internal override void ValidateObject(JToken o, JToken previous)
{
ValidationUtils.ArgumentNotNull(o, "o");
switch (o.Type)
{
case JTokenType.Property:
throw new ArgumentException("An item of type {0} cannot be added to content.".FormatWith(CultureInfo.InvariantCulture, o.Type));
}
}
/// <summary>
/// Writes this token to a <see cref="JsonWriter"/>.
/// </summary>