-Changed JToken.Children to return an empty iterator rather than erroring

This commit is contained in:
JamesNK
2011-10-01 05:37:08 +00:00
parent 3baf856f92
commit 14b8661c92
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -265,7 +265,7 @@ namespace Newtonsoft.Json.Linq
/// <returns>An <see cref="IEnumerable{T}"/> of <see cref="JToken"/> containing the child tokens of this <see cref="JToken"/>, in document order.</returns>
public virtual JEnumerable<JToken> Children()
{
throw new InvalidOperationException("Cannot access child value on {0}.".FormatWith(CultureInfo.InvariantCulture, GetType()));
return JEnumerable<JToken>.Empty;
}
/// <summary>