Please enable JavaScript to view this site.

Codolex

Previous topic: Using flows in code

 

In the next steps, we are going to change the application to convert this JSON to a structured object. This is called "entities" in Codolex.

 

The first thing we have to do is to import the JSON structure. Luckily, Codolex has a handy tool for this (not only for JSON structures, you can also import directly from a database structure). Let’s import the JSON structure in our example application.

 

To do so, right click on Data sources, and click on Add data source.

 

clip0013

 

This will start the "Add data source" wizard. Give the Data source a name, for example, TimeZone, and choose REST as the data source type. Leave the "Import data" option to "Yes". After you click the save button, Codolex will open the "Import" wizard. Select JSON as the "Import" from option, give a name for the new entity that Codolex will create, for example TimeZoneResult. Now open the URL https://timeapi.io/api/Time/current/zone?timeZone=Europe/Amsterdam, copy the JSON and paste this JSON in the form.

 

clip0014

 

Click Next. In the following screen, make sure to select the TimeZoneResult checkbox, click Next again, and finish the wizard.

 

To see how we can use this entity, go to the next section: Using entities

© by GDK Software