referrerpolicy=no-referrer-when-downgrade

Function sc_chain_spec::json_patch::merge

source ·
pub fn merge(a: &mut Value, b: Value)
Expand description

Recursively merges two JSON objects, a and b, into a single object.

If a key exists in both objects, the value from b will override the value from a (also if value in b is null). If a key exists only in b and not in a, it will be added to a. No keys will be removed from a.

§Arguments

  • a - A mutable reference to the target JSON object to merge into.
  • b - The JSON object to merge with a.