Extensions and utility functions for System.Text.Json.
One of the main drivers behind Denomica.Text.Json was to implement merging functionality for JSON data. That seems to be an increasingly common requirement in applications processing JSON data.
Merging two JSON documents or elements is a tree-step process.
JsonDocument
object.All of these steps are supported by extension methods defined in the ExtensionMethods
class.
Please note that the
JsonDocument
implements theIDisposable
, so you must handle it accordingly.
If a value with the same key exists in both source and target, then the following rules apply.
Merging JSON arrays is primarily used when merging JSON documents or JSON elements.
The following rules apply when merging arrays.