JMESPath expressions with an operator in the expression part of a variable binding (expression between 'let $var=' and 'in') are not parsed correctly.
given:
{"foo": false, "bar": true}
search expression:
let $var = foo || bar in $var
expected:
yields result true
actual:
gives error during evaluation: assertion 'stack.size() == 1' failed
Include a small, self-contained example if possible
TEST_CASE("jmespath let with operator binding expression")
{
SECTION("Test binary or operator")
{
auto doc = jsoncons::json::parse(R"({"foo": false, "bar": true})");
auto expected = jsoncons::json::parse(R"(true)");
std::string query = R"(let $op = foo || bar in $op)";
auto expr = jmespath::make_expression<jsoncons::json>(query);
jsoncons::json result = expr.evaluate(doc);
CHECK(expected == result);
}
}
JMESPath expressions with an operator in the expression part of a variable binding (expression between 'let $var=' and 'in') are not parsed correctly.
given:
{"foo": false, "bar": true}search expression:
let $var = foo || bar in $varexpected:
yields result
trueactual:
gives error during evaluation:
assertion 'stack.size() == 1' failedInclude a small, self-contained example if possible