Wyn Enterprise User Guide

Wyn Enterprise: Json Data Provider

To create a Json data source in Wyn Enterprise, follow these steps.

  1. On the Resource Portal, navigate to Create (+) > Create Data Source.

  2. Select Json in the data source list on the left or in the icon view on the right.

  3. Fill in the database configuration information for the selected data source.

Field Description
Name The name for the data source that you want to specify.
SourceType Select from the list that displays the following options - Local, Web, Embed, and File System.
Data Source When the source type is Local, click Select File to select the local source file.
When the source type is Web, you need to enter the address of the source, which is usually a URL. For example, https://yourdomain.com/api/values/json.json
When the source type is Embed, you need to enter or paste the content of the Json file.
When the source type is File System, you need to enter the path to the file location.
Authentication Method If the source type is Web, you need to set the authentication mode. You can choose from None, Basic and OAuth2.
If the AuthMode is Basic, you need to set the user name and password.
If the AuthMode is OAuth2, you need to set GrantType, Token Endpoint, Client Id, Client Secret, UserName, Password, and Scope.
Pre-Query: Json path Parses the Json data structure and extracts the Json path expression of the specified data set, such as $.bookstore.books[*].
For the syntax of Json path, see http://goessner.net/articles/JsonPath/.
  1. Click Next. You will have the data source structure, where you can adjust the preview column width by dragging the column width adjustment symbol.

  2. Click Create.

After the successful creation, you can view the added data source in the Categories tab of the Resource Portal.

Note: Data refresh : Since the data is imported into the system, if you want to refresh the data of the data source, you need to manually edit the data source and import the data again.

Note: If garbled characters appear when a local Json file is used, save the file in the UTF-8 encoding and upload it again..
Also, if a column with the same name is detected, only the column that appears first is retained, whereas the data from the column with the same name is discarded.

Web-based JSON Data Source

When the Source Type of the JSON data source is Web, you may need to setup an HTTP service on your own to return JSON data. You can use any programming language or platform for this HTTP service to return the JSON data content, for example.

https://ds-demo.grapecitydev.com/api/values/json.json

The content returned by the above URL is as follows. Web-based JSON Data Source

Note: Pay attention to the structure of JSON data. The root node should be a collective entity name, such as users. Its content is an array, and each array element is an instance of another entity class (such as user), expressed in the form of attribute key-value pairs.