confight icon indicating copy to clipboard operation
confight copied to clipboard

Implement merging strategies

Open frank-lenormand opened this issue 2 years ago • 0 comments

Related to #14.

It would be nice to be able to specify a merging strategy to guide Confight as to what its expected behaviour would be when merging two dictionaries.

Examples include:

  • merging lists
  • ignoring the right hand value if the left hand value isn’t set (i.e. only update, no upsert)
  • replacing the entire left hand dictionary with an existing right hand dictionary (i.e. the default behaviour of {**left, **right})
  • matcher objects that dynamically set a strategy, predicated on the current key/dictionary being processed

frank-lenormand avatar Nov 14 '23 13:11 frank-lenormand