-Fixed error with whitespace only JSONPath

-Fixed property query path that starts with $
-Fixed array query path with open brace after $
This commit is contained in:
James Newton-King
2014-02-23 14:35:28 +13:00
parent c49b58ae18
commit e4ae07003b
4 changed files with 62 additions and 14 deletions
@@ -141,6 +141,14 @@ namespace Newtonsoft.Json.Tests.Linq.JsonPath
Assert.AreEqual(null, ((ArrayIndexFilter)path.Filters[0]).Index);
}
[Test]
public void RootArrayNoDot()
{
JPath path = new JPath("$[1]");
Assert.AreEqual(1, path.Filters.Count);
Assert.AreEqual(1, ((ArrayIndexFilter)path.Filters[0]).Index);
}
[Test]
public void WildcardArray()
{