merge


Description:

public static JsonValue? merge (JsonValue a, JsonValue b)

Merges two JSON objects, with the second taking precedence.

Returns a new tree. The originals are not modified.

Example:

    var merged = Json.merge (defaults, overrides);

Parameters:

a

first object.

b

second object (keys here override a).

Returns:

merged object, or null if either is not an object.