kgabis/parson

Question: How to merge two json objects?

Closed this issue · 1 comments

Is there a merge function that can merge two or more json object into one? Using SQL's terms, the "merge" can be either inner, outer, left, or right join.

A possible use case may be: Two json objects represent default settings and user settings, the user's json object may be a subset of the default json object (as there may be "invalid" fields and/or comments). For any field appears in both jsons, accept user's one; only in the user's json, reject; only in default json, accept default one.

A demonstrative image from Wikipedia

No, there isn't and I don't plan on adding this, sorry.