dict_delta
A dict_delta is a type of delta that
unassigns, moves, or assigns fields in a JSON object, creating it if it does not yet exist.
The dict_delta can be used on the route.custom or job.custom fields, for example.
If multiple operations are specified, the fields are applied in the following order: unassign, move, assign.
| Name | Type | Description |
|---|---|---|
| $collection | string | Required. Must be "dict" for a dict_delta. |
| $path | string | Required on top-level deltas. The JSON path to modify. See Paths for a list of valid paths. |
| assign | custom | Optional. Assign the fields to the existing object. |
| move | custom | Optional. Rename the fields on the existing object. |
| unassign | string[] | Optional. Use unassign to remove the specified fields from the existing object. |
Example
A revision modifying route.custom using a dict_delta:
{
"deltas": [{
"$path": ["route"],
"$collection": "keyed_array",
"ids": ["route0", "route1"],
"assign": {
"custom": {
"$collection": "dict",
"assign": {
"custom_123": "456",
},
"move": {
"custom_rename_from": "custom_rename_to",
},
"unassign": ["custom_789"],
},
},
}]
}