Closed glassfishrobot closed 7 years ago
Reported by adler.fleurant
adler.fleurant said: Furthermore, I would add that it's fairly inconsistent with the rest of the API.
JsonArrayBuilder does build a JsonArray and JsonObjectBuilder a JsonObject.
adler.fleurant said: I have a Patch for this but I don't know how to upload it or submit.
adler.fleurant said: I needed to add more explanation as the title might not be good enough.
This issue is for JsonPatchBuilder build method to return a JsonPatch instead of a JsonArray.
adler.fleurant said: This issue seems to have been resolved by patch submitted by Soto.
@lukasj said: yes, this has been already fixed by https://java.net/projects/jsonp/sources/git/revision/b6f28e08380b4fcf89b5eebaa214a2d084bbd0c5
This issue was imported from java.net JIRA JSON_PROCESSING_SPEC-71
Marked as fixed on Tuesday, November 29th 2016, 12:09:23 pm
I have notice some inconsistencies in JsonPatchBuilder which build a JsonArray instead of a JsonPatch.
I would advocate that a JsonPatch is a JsonArray but a JsonArray isn't necessarily a JsonPatch. The build operation should create a JsonPatch to avoid the boiler plate JsonPatch::new(JsonArray) operation and confusion on the returned instance.
Affected Versions
[1.1]