JSON merge API with pluggable merge behaviors
Design and implement a function that merges two JSON documents, where the way conflicts are resolved is pluggable: for example, how two objects, two arrays or two different scalar values under the same key are combined. Show the default behaviors, how a caller plugs in its own, and how nested structures are handled.
No answer yet. Write the first one; the best answer gets endorsed.
