Add test with escaped JSON Path (#2138)
This commit is contained in:
@@ -1489,6 +1489,23 @@ namespace Newtonsoft.Json.Tests.Linq.JsonPath
|
|||||||
Assert.AreEqual("String", mustBeString2.Single());
|
Assert.AreEqual("String", mustBeString2.Single());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void QueryWithEscapedPath()
|
||||||
|
{
|
||||||
|
JToken t = JToken.Parse(@"{
|
||||||
|
""Property"": [
|
||||||
|
{
|
||||||
|
""@Name"": ""x"",
|
||||||
|
""@Value"": ""y"",
|
||||||
|
""@Type"": ""FindMe""
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}");
|
||||||
|
|
||||||
|
var tokens = t.SelectTokens("$..[?(@.['@Type'] == 'FindMe')]").ToList();
|
||||||
|
Assert.AreEqual(1, tokens.Count);
|
||||||
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public void Equals_FloatWithInt()
|
public void Equals_FloatWithInt()
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user