open-source-parsers / open-source-parsers/jsoncpp

Data Corruption on Name in Output

Open
#1,449 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
C++
Stars
8.9k
Forks
2.7k
Avg merge
31m
Merged PRs (30d)
1

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the supplied Json::Value reproduction and compare its Release and Debug output under Visual Studio 2022 and CMake 2.25. Trace the output path used by std::cout for the two keys, then verify that the Release build preserves "os_version" exactly as shown in the expected output.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.