You can perform the following tasks with a JSON file in a synchronization task.
Updating or Merging the Existing JSON File
When you want to add other modules such as address, phone numbers, location, references to existing JSON file, select Update as the task operation.
1Create a new synchronization task.
2In Definition tab, select Update as the task operation.
3Follow the same procedure of creating a JSON Target file using Insert task operation to update the existing JSON file.
Note: In Source tab, select the source object file with which you want to update-merge the existing JSON file.
Note: In Target tab, select the target object that is the child element of the element present in the existing JSON target file.
Cleaning the Merged JSON File
You must clean the merged JSON file to remove all the unnecessary syntax and quotes.
1Select the updated synchronization task in the synchronization page.
2Create a copy of the task.
3Click Edit to rename the task.
4In the Field Mapping tab, click edit next to the ISFINALJSON field.
The Field Expression page appears. The following image shows the Field Mapping tab:
5Enter the value of the ISFINALJSON field as 'false' to 'true accordingly.
- Enter ‘false’ for creating and updating the JSON target file
- Enter ‘true’ for cleaning the JSON target file.
6Click Save and run the task.
The following image shows the updated and cleaned JSON Target File:
The following are the XPK and XFK values for the given sample JSON file.
Passing Null Values in the Source File
You can use the config.ini file to pass null values to the empty fields in the source file.
The values provided in the config.ini file replaces all empty fields of the source file in the target JSON file.
You can customize the config.ini file located in the following directories:
•<Secure Agent installation directory>\downloads\<latest connector zip package>\package\plugins\<Plugin ID>
•<Secure Agent installation directory>\downloads\<latest connector zip package>\package\rdtm\javalib\<Plugin ID>
For example, you can pass null value for the replace_empty_xml_field field as shown in the following figure:
When you provide the value as null, the value is considered as null for all the empty parameters. You can also provide empty string (“ ”) as a value for this field. Any other values, besides null and empty string (“ ”) are considered as null.