Package org.apache.juneau.bean.jsonpatch
@Marshalled types for
JSON Patch (RFC 6902).
Overview
A JSON Patch document is a JSON array of operation objects describing changes to apply to a target JSON
document. Each operation object has an op member naming one of the six operation types
(add, remove, replace, move, copy, test), a path
member (JSON Pointer per RFC 6901), and op-specific additional members. The matching ContentType
constant is org.apache.juneau.http.header.ContentType#APPLICATION_JSON_PATCH.
Bean Classes
JsonPatchOperation- Abstract base. Polymorphic dispatch wired via@Marshalled(typePropertyName="op", dictionary={...}), so the parser materializes the correct concrete subclass keyed off theopmember.AddOp-op:"add"+value.RemoveOp-op:"remove".ReplaceOp-op:"replace"+value.MoveOp-op:"move"+from.CopyOp-op:"copy"+from.TestOp-op:"test"+value.JsonPatch-LinkedList<JsonPatchOperation>; the JSON Patch document serializes as a top-level JSON array (mirrorsJsonSchemaArray).
Example
JsonPatch
See Also:
-
ClassesClassDescriptionThe JSON Patch
"add"operation per RFC 6902 § 4.1.The JSON Patch"copy"operation per RFC 6902 § 4.5.Represents a JSON Patch document per RFC 6902.A pairing of aJsonSerializerandJsonParserinto a single class with convenience to/of methods, pre-wired for JSON Patch'sJsonPatchOperationdiscriminator.Abstract base for a JSON Patch operation per RFC 6902.The JSON Patch"move"operation per RFC 6902 § 4.4.The JSON Patch"remove"operation per RFC 6902 § 4.2.The JSON Patch"replace"operation per RFC 6902 § 4.3.The JSON Patch"test"operation per RFC 6902 § 4.6.