creates a diff as a JSON patch
Declared in <nlohmann/json.hpp>
[[nodiscard]]
static
basic_json
diff(
basic_json const& source,
basic_json const& target,
string_t const& path = "");
a JSON Patch (RFC 6902) document describing the changes needed to turn source into target
The return value should not be discarded.
| Name | Description |
|---|---|
| source | JSON value to compare from |
| target | JSON value to compare against |
| path | JSON Pointer path prefixed to the paths of the generated operations |