Additional options for merging arrays
Closed this issue · 0 comments
oswaldobapvicjr commented
Is your feature request related to a problem? Please describe.
No
Describe the solution you'd like
Based on the fluent API proposed on #6, add new methods to configure fine options to be applied during the merge of arrays identified by a valid JsonPath:
For example (suggested API improvement):
// Explicitly describe the current behavior applied when no MergeOption is provided
MergeOption.onPath("$.myArray")
.addDistinctObjectsOnly(); // avoid duplicate objects in the array
// Add new option
MergeOption.onPath("$.myArray")
.addAll(); // additional option where duplicates must be kept
Describe alternatives you've considered
N/A
Additional context
N/a