Skip to content

Type in README.md #1486

Description

@jonericcook
  • 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?

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