29#ifndef INCLUDE_OLA_WEB_JSONPATCH_H_
30#define INCLUDE_OLA_WEB_JSONPATCH_H_
84 std::auto_ptr<const JsonValue> m_value;
131 std::auto_ptr<const JsonValue> m_value;
201 std::auto_ptr<const JsonValue> m_value;
229 bool Empty()
const {
return m_patch_ops.empty(); }
232 typedef std::vector<JsonPatchOp*> PatchOps;
234 PatchOps m_patch_ops;
Basic data types used to represent elements in a JSON document.
An implementation of Json Pointers (RFC 6901).
Add a JsonValue.
Definition JsonPatch.h:68
JsonPatchAddOp(const JsonPointer &path, const JsonValue *value)
Add the JsonValue to the specified path.
Definition JsonPatch.h:75
bool Apply(JsonValue **value) const
Apply the patch operation to the value.
Definition JsonPatch.cpp:189
Copy a value from one location to another.
Definition JsonPatch.h:165
bool Apply(JsonValue **value) const
Apply the patch operation to the value.
Definition JsonPatch.cpp:273
JsonPatchCopyOp(const JsonPointer &from, const JsonPointer &to)
Copy a value from one location to another.
Definition JsonPatch.h:172
Move a value from one location to another.
Definition JsonPatch.h:140
bool Apply(JsonValue **value) const
Apply the patch operation to the value.
Definition JsonPatch.cpp:232
JsonPatchMoveOp(const JsonPointer &from, const JsonPointer &to)
Move a value from one location to another.
Definition JsonPatch.h:147
A class to serialize a JSONValue to text.
Definition JsonPatch.h:52
virtual bool Apply(JsonValue **value) const =0
Apply the patch operation to the value.
Remove the value at the specified path.
Definition JsonPatch.h:93
bool Apply(JsonValue **value) const
Apply the patch operation to the value.
Definition JsonPatch.cpp:193
JsonPatchRemoveOp(const JsonPointer &path)
Add the JsonValue to the specified path.
Definition JsonPatch.h:99
Replace the value at the specified path.
Definition JsonPatch.h:115
JsonPatchReplaceOp(const JsonPointer &path, const JsonValue *value)
Replace the JsonValue at the specified path.
Definition JsonPatch.h:122
bool Apply(JsonValue **value) const
Apply the patch operation to the value.
Definition JsonPatch.cpp:212
An ordered collection of JsonPatchOps.
Definition JsonPatch.h:211
void AddOp(JsonPatchOp *op)
Add a patch operation to the set.
Definition JsonPatch.cpp:321
bool Apply(JsonValue **value) const
Apply this patch set to a value.
Definition JsonPatch.cpp:325
Test a path matches the specified value.
Definition JsonPatch.h:190
bool Apply(JsonValue **value) const
Apply the patch operation to the value.
Definition JsonPatch.cpp:301
A JSON pointer (RFC 6901) refers to a possible element in a JSON data structure.
Definition JsonPointer.h:66
The base class for JSON values.
Definition Json.h:119
The namespace containing all OLA symbols.
Definition Credentials.cpp:44