Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Additional options for merging arrays #7

Closed
oswaldobapvicjr opened this issue Aug 19, 2022 · 0 comments · Fixed by #9
Closed

Additional options for merging arrays #7

oswaldobapvicjr opened this issue Aug 19, 2022 · 0 comments · Fixed by #9
Assignees
Labels
enhancement New feature or request

Comments

@oswaldobapvicjr
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant