Skip to content

Poco::JSON::Array is no array for Poco::Dynamic::Var #1860

@JoshuaBehrens

Description

@JoshuaBehrens

I parsed JSON and realized that Poco::Dynamic::Var<Poco::JSON::Array>::isArray evaluates to false. I expected it to return true.

Implementation that results to the unexpected behaviour.

return false;

Sample code to reproduce:

Poco::JSON::Array arr;
arr.add(1); // make it non empty
Poco::Dynamic::Var(arr).isArray();

or with the parser:

Poco::JSON::Parser().parse("[1]").isArray()

If this is expected behaviour can I get an explanation why Poco::JSON::Array is interpreted as no array?

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions