Skip to content

Using jsoncpp::fields() out of struct #4

@niXman

Description

@niXman

Hi,

Tell me please, how can I use jsoncpp::fields() out of struct?
For example I have a string with JSON and I want to get the fields from this JSON.

int a, b;
std::string str = R"({"a":1,"b":2})";
jsoncpp::fields(str, "a", a, "b", b);

How can I do this?

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions