Closed joachimLengacher closed 2 years ago
Describe the bug
Converting PatchOperation back into JSON produces something like
PatchOperation
{ "path":"/displayName", "value":"some name", "opType":"REPLACE" }
Problem: the op the attribute is missing while opType is unexpected when de-serializing this back into a PatchOperation instance!
op
opType
To Reproduce
AddOperation addOperation = new AddOperation(new JsonPointer("/displayName"), new TextNode("some name")); ObjectMapper mapper = new ObjectMapper(); String json = mapper.writeValueAsString(addOperation);
json will contain opType instead of the expected op property.
json
Expected behavior
The JSON generated with the example above should look as follows:
{ "path":"/displayName", "value":"some name", "op":"replace" }
The problem could easily be solved by adding the following method to PatchOperation
public String getOp() { return getOpType().toString(); }
Additional context None.
Describe the bug
Converting
PatchOperation
back into JSON produces something likeProblem: the
op
the attribute is missing whileopType
is unexpected when de-serializing this back into aPatchOperation
instance!To Reproduce
json
will containopType
instead of the expectedop
property.Expected behavior
The JSON generated with the example above should look as follows:
The problem could easily be solved by adding the following method to
PatchOperation
Additional context None.