For example, the following configuration can be used to synchronize the value and type fields of ubidEmailJSON from the source to a destination. To synchronize this source value:

ubidEmailJSON: {"value" : "jsmith@example.com",
                "type" : "home",
                "primary" : true}

to this value at the destination:

ubidEmailJSON: {"value" : "jsmith@example.com",
                "type" : "home"}

A JSON Attribute configuration object must be created and associated with the Sync Class. This can be done by either explicitly including the fields to synchronize:

$ bin/dsconfig create-json-attribute --pipe-name "A to B" \
  --class-name Users \
  --attribute-name ubidEmailJSON \
  --set include-field:type \
  --set include-field:value

Or by excluding the fields that should not be synchronized:

$ bin/dsconfig create-json-attribute \
  --pipe-name "A to B" \
  --class-name Users \
  --attribute-name ubidEmailJSON \
  --set exclude-field:preferred \
  --set exclude-field:verified

If the destination is prepared to only handle a specific subset of fields, then list the fields to include. However, if only a small, known subset of fields from the source should be excluded, then exclude-field could be used. In this example, the destination data for the ubidEmailJSON attribute will always be a subset of the full data.

Note:

A Sync Class can be configured to exclude certain attributes from synchronization. Creating a regular attribute mapping will override this setting, and the attribute will be synchronized. Creating a JSON attribute mapping does not override this setting, and the JSON attribute will not be synchronized. A JSON attribute is not a traditional attribute mapping. It only includes information on the destination attribute name. To work around this, the attribute either needs to be mapped from a source attribute, or have its value constructed.

The following scenario illustrates how the destination can include additional fields that are not present at the source.