Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Type in README.md #1486

Closed
jonericcook opened this issue Feb 20, 2019 · 1 comment
Closed

Type in README.md #1486

jonericcook opened this issue Feb 20, 2019 · 1 comment

Comments

@jonericcook
Copy link

  • What is the issue you have?
    Found a typo
  • Please describe the steps to reproduce the issue. Can you provide a small but working code example?
    View this link https://github.com/nlohmann/json#json-merge-patch
  • What is the expected behavior?
    // a JSON value
    json j_document = R"({
    "a": "b",
    "c": {
    "d": "e",
    "f": "g"
    }
    })"_json;

// a patch
json j_patch = R"({
"a":"z",
"c": {
"f": null
}
})"_json;

// apply the patch
j_document.merge_patch(j_patch);
// {
// "a": "z",
// "c": {
// "d": "e"
// }
// }

  • And what is the actual behavior instead?
    // a JSON value
    json j_document = R"({
    "a": "b",
    "c": {
    "d": "e",
    "f": "g"
    }
    })"_json;

// a patch
json j_patch = R"({
"a":"z",
"c": {
"f": null
}
})"_json;

// apply the patch
j_original.merge_patch(j_patch);
// {
// "a": "z",
// "c": {
// "d": "e"
// }
// }

  • Which compiler and operating system are you using? Is it a supported compiler?
    N/A
  • Did you use a released version of the library or the version from the develop branch?
    develop branch
  • If you experience a compilation error: can you compile and run the unit tests?
nickaein added a commit to nickaein/nlohmann-json that referenced this issue Feb 21, 2019
@nickaein nickaein mentioned this issue Feb 21, 2019
4 tasks
@nickaein
Copy link
Contributor

Thanks for reporting!

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

No branches or pull requests

2 participants