Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

The parsed string is quoted #1

Open
FusEcho opened this issue Aug 11, 2020 · 0 comments
Open

The parsed string is quoted #1

FusEcho opened this issue Aug 11, 2020 · 0 comments

Comments

@FusEcho
Copy link

FusEcho commented Aug 11, 2020

void case2()
{
    std::string str = R"({
        "name": "happy",
        "age" : 23,
    })";

    auto j = json_t::parse(str);

    assert(j["age"] == 23);
    assert(j["name"] == "happy");

    std::cout << j["name"] << std::endl;
}

returned "happy" with quotation marks, which should be the string only.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant