jsoncpp icon indicating copy to clipboard operation
jsoncpp copied to clipboard

Data Corruption on Name in Output

Open LeeGDavis opened this issue 3 years ago • 2 comments

Describe the bug We are getting name corruption on output

To Reproduce Steps to reproduce the behavior:

Json::Value root;
root["os_description"] = Json::Value(1);
root["os_version"] = Json::Value(1);
std::cout << "ROOT : " << root << std::endl;

Output:

ROOT: {
        "os_description" : 1,
        "os_versiontion" : 1
}

Expected behavior The original names to be respected:

ROOT: {
        "os_description" : 1,
        "os_version" : 1
}

Desktop (please complete the following information):

  • OS: Windows 10 Pro for workstations 22H2
  • vcpkg - jsoncpp 1.9.5

Additional context This has worked great for years. Tried a build with VS 2022 and cmake 2.25 and c++ v17 Release version is broken while debug versions works fine and present the correct output.

LeeGDavis avatar Nov 26 '22 02:11 LeeGDavis

I never got to bottom of the cause of this, but updated to vcpkg tags/2022.11.14 from tags/2022.02.23 and the problem has since gone away.

LeeGDavis avatar Nov 28 '22 18:11 LeeGDavis

I am observing the same bug. In my case it was revealed after VS2022 update to the v17.4.2 (v17.4.3 was released 2 days ago)

I've downgraded JsonCpp frm v1.9.5 to the v1.9.2 and that solved the problem.

@cdunn2001, @BillyDonahue IMO it is very serious problem. Could You bump priority and provide fix?

atrelinski avatar Dec 15 '22 16:12 atrelinski