javaee / json-processing-spec

Legacy JSON Processing spec. Please use the link below to find the current JSON P project
https://github.com/jakartaee/jsonp-api
Other
8 stars 3 forks source link

JsonPatchBuilder should return JsonPatch #71

Closed glassfishrobot closed 7 years ago

glassfishrobot commented 8 years ago

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]

glassfishrobot commented 8 years ago

Reported by adler.fleurant

glassfishrobot commented 8 years ago

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.

glassfishrobot commented 8 years ago

adler.fleurant said: I have a Patch for this but I don't know how to upload it or submit.

glassfishrobot commented 8 years ago

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.

glassfishrobot commented 8 years ago

adler.fleurant said: This issue seems to have been resolved by patch submitted by Soto.

glassfishrobot commented 7 years ago

@lukasj said: yes, this has been already fixed by https://java.net/projects/jsonp/sources/git/revision/b6f28e08380b4fcf89b5eebaa214a2d084bbd0c5

glassfishrobot commented 7 years ago

This issue was imported from java.net JIRA JSON_PROCESSING_SPEC-71

glassfishrobot commented 7 years ago

Marked as fixed on Tuesday, November 29th 2016, 12:09:23 pm