Interface PatchError
- All Known Implementing Classes:
PatchError.DuplicateMember, PatchError.FromNotFound, PatchError.InvalidPointer, PatchError.MissingMember, PatchError.MoveIntoChild, PatchError.NotAnArray, PatchError.NotAnObject, PatchError.NotAString, PatchError.PathNotFound, PatchError.RootRemoved, PatchError.TestFailed, PatchError.UnknownOperation, PatchError.ValueNotRepresentable
public sealed interface PatchError
permits PatchError.NotAnArray, PatchError.NotAnObject, PatchError.MissingMember, PatchError.DuplicateMember, PatchError.NotAString, PatchError.UnknownOperation, PatchError.InvalidPointer, PatchError.PathNotFound, PatchError.FromNotFound, PatchError.RootRemoved, PatchError.MoveIntoChild, PatchError.TestFailed, PatchError.ValueNotRepresentable
An error of a JSON Patch: a patch document that violates RFC 6902, or an operation that is not successful (RFC 6902, Section 5).
Each error, except PatchError.NotAnArray, has the zero-based index of its operation in the patch.
| Error | Cause |
|---|---|
PatchError.NotAnArray |
the patch document is not an array (Section 3) |
PatchError.NotAnObject |
an operation is not an object (Section 3) |
PatchError.MissingMember |
an operation has no op, path, from, or value that it needs |
PatchError.DuplicateMember |
an operation has a member more than once, for example two op members (Section 4) |
PatchError.NotAString |
op, path, or from is not a string |
PatchError.UnknownOperation |
op is not add, remove, replace, move, copy, or test |
PatchError.InvalidPointer |
path or from is not a valid JSON Pointer |
PatchError.PathNotFound |
the target location, or its parent for add, does not exist |
PatchError.FromNotFound |
the from location does not exist |
PatchError.RootRemoved |
remove has the whole document as its target |
PatchError.MoveIntoChild |
from is a proper prefix of path (Section 4.4) |
PatchError.TestFailed |
the values of a test are not equal (Section 4.6) |
PatchError.ValueNotRepresentable |
the target model cannot hold a number of the value, or the value has an object with duplicate member names |
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final recordAn operation has a member more than once.static final recordThefromlocation of amoveor acopydoes not exist (Sections 4.4 and 4.5).static final recordThepathorfrommember of an operation is not a valid JSON Pointer.static final recordAn operation has no member that it needs:opandpath(Section 4),valueforadd,replace, andtest, orfromformoveandcopy.static final recordThefromlocation of amoveis a proper prefix of itspath(Section 4.4).static final recordThe patch document is not an array (RFC 6902, Section 3).static final recordAn operation is not an object (RFC 6902, Section 3).static final recordTheop,path, orfrommember of an operation is not a string.static final recordThe target location does not exist.static final recordAremovehas the whole document as its target.static final recordThe value at the target location of atestis not equal to its value (Section 4.6).static final recordTheopof an operation is not one of the six operations (Section 4).static final recordThe value of an operation cannot be added to the target document: the target model cannot hold one of its numbers, for example1e99999999999in a Jackson tree, or an object of the value has duplicate member names, which have no defined value (RFC 8259, Section 4). -
Method Summary
-
Method Details
-
message
-