This sample loads JSON and then queries values from it using Argon.JToken.SelectToken(System.String)
with a strict equals JSON Path.
var items = JArray.Parse("""
[
{
'Name': 'Valid JSON',
'Valid': true
},
{
'Name': 'Invalid JSON',
'Valid': 'true'
}
]
""");
// Use === operator. Compared types must be the same to be valid
var strictResults = items.SelectTokens("$.[?(@.Valid === true)]").ToList();
foreach (var item in strictResults)
{
Console.WriteLine((string) item["Name"]);
}
// Valid JSON