Skip to content

jsonpath query empty array's length expect [0] but get [] #416

@zongyanke

Description

@zongyanke

Describe the bug
string jsonStr = R"(
{
"comments": []
}
)";
json data = json::parse(jsonStr.c_str());
json result = jsonpath::json_query(data, "$.comments.length");

result == [0]

result == []

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions