You may have noticed when creating a Smart Connector there is a selector labeled “Use JSON File Config” near the middle of the page. This article will describe what that feature does and when to use it.
What is a JSON file?
The standard API file format is called JSON (pronounced “Jay - Sawn”). A Smart Connect will automatically detect and interpret JSON files without any additional configuration. These files can be uploaded using any of the Delivery Types
For more information on Smart Connector Delivery Types, see this article.
JSON files follow a specific format that consists of Objects, Values, Arrays, and Subarrays. In the example shown below, you can see this JSON file relates to Order information.
An example of the OBJECT is “orderno”
And example of a VALUE is “7487453575”
These pieces of data are organized into ARRAYS
And ARRAYS can have additional information related to one OBJECT shown as a SUBARRAY
What does “Use JSON File Config” do?
The Smart Connector enables you to upload data into TapClicks using nearly any file type from essentially any location. The most common file types uploaded are .csv files, but on occasion, you maybe end up with data that has been taken directly from an API.
However, you may not want all of the data from the JSON file as sometimes these can be quite large. In the example above related to Order information, you may just want to extract the Customer information shown in the Subarray.
The “Use JSON File Config” switch enables you to isolate or omit data from a JSON file by referring to the arrays and subarrays.
When selected, the Use JSON File Config option will populate a new set of fields in the Smart Connector setup window.
If you would like to isolate data from the JSON file, you can enter in the path to the array or subarry in the Data Path field.
If you would like to exclude data from the file but keep everything else, you can enter the path of the arrays or subrrays you’d like to omit from the field mapping step by entering those values in the Exclude Paths field.
After you have entered these details, when you upload your sample file, the system will include or omit the data as you have requested to reduce the number of fields you need to map.
Do I need to turn on "Use JSON File Config" every time I upload a JSON file?
No. This feature is only used if you want to isolate or omit data from a JSON file. The TapClicks Smart Connector will automatically detect and parse JSON files whether you use this feature or not.