Skip to content

An error in the documentation for Poco/JSON/Parser.h #3237

@meolic

Description

@meolic

On page https://pocoproject.org/docs/Poco.JSON.Parser.html the following example is given.

Example:

std::string json = "{ \"name\" : \"Franky\", \"children\" : [ \"Jonas\", \"Ellen\" ] }";
Parser parser;
Var result = parser.parse(json);
Object::Ptr object = result.extract<Object::Ptr>();
std::string name = object.getValue<std::string>("name");
Array::Ptr children = object.getArray("children");

To get this working I had to change the last two lines into:

std::string name = object->getValue<std::string>("name");
Array::Ptr children = object->getArray("children");

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions