#include <json-patch.hpp>
|
| json | j_ = nlohmann::json::array() |
Definition at line 20 of file json-patch.hpp.
◆ json_patch() [1/3]
◆ json_patch() [2/3]
Definition at line 74 of file json-patch.cpp.
75 :
j_(std::move(patch))
76{
78}
static void validateJsonPatch(json const &patch)
◆ json_patch() [3/3]
◆ add()
Definition at line 86 of file json-patch.cpp.
87{
88 j_.push_back(
json{{
"op",
"add"}, {
"path", ptr.to_string()}, {
"value", std::move(value)}});
89 return *this;
90}
◆ get_json() [1/2]
◆ get_json() [2/2]
◆ operator json()
| nlohmann::json_patch::operator json |
( |
| ) |
const |
|
inline |
◆ remove()
Definition at line 98 of file json-patch.cpp.
99{
100 j_.push_back(
json{{
"op",
"remove"}, {
"path", ptr.to_string()}});
101 return *this;
102}
◆ replace()
Definition at line 92 of file json-patch.cpp.
93{
94 j_.push_back(
json{{
"op",
"replace"}, {
"path", ptr.to_string()}, {
"value", std::move(value)}});
95 return *this;
96}
◆ validateJsonPatch()
Definition at line 104 of file json-patch.cpp.
105{
106
107 static nlohmann::json_schema::json_validator patch_validator(patch_schema);
108
109 patch_validator.validate(patch);
110
111 for (auto const &op : patch)
112 json::json_pointer(op["path"].get<std::string>());
113}
◆ j_
The documentation for this class was generated from the following files: