With the Data Engine library, you can import data from JSON files to the DataEngine table into a queryable collection of objects in your code.
To connect Data Engine to a JSON file, you need to follow the steps given below:
Initialize a new workspace folder relative to the project root directory using the Init method of the Workspace class.
Create a class containing properties that can hold the data corresponding to the fields you have in the JSON file.
Convert the JSON file data to a collection of custom .NET objects using the DeserializeObject method of the JsonConvert class, which is available in the Newtonsoft.Json NuGet package.
To connect the DataEngine to the retrieved collection of custom objects, create an instance of the ObjectConnector class and pass the Workspace object and the custom collection initialized above, as parameters to its constructor. Use the ObjectConnector’s GetData method to create a DataEngine table containing the imported data.
Once the connection is established, the queries can be defined and executed to fetch the desired data. Refer to Transform Data topic for more information.