ObjectMerge
Namespace: Vercel.AI.Util
public static class ObjectMergeDeep-merges JSON objects. Arrays, dates, and regular expressions are replaced.
Inheritance: object
Methods
Section titled “Methods”MergeObjects(IDictionary<string, object>?, IDictionary<string, object>?)
Section titled “MergeObjects(IDictionary<string, object>?, IDictionary<string, object>?)”public static IDictionary<string, object>? MergeObjects(IDictionary<string, object>? baseObject, IDictionary<string, object>? overrides)Merges <code class=“paramref”>overrides</code> onto a copy of <code class=“paramref”>baseObject</code>.
Undefined override values are skipped. __proto__, constructor, and prototype are ignored.
Returns null when both inputs are null.
Parameters
| Name | Type | Description |
|---|---|---|
baseObject |
IDictionary<string, object> | |
overrides |
IDictionary<string, object> |
Returns: IDictionary<string, object>
Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product