Configuring JSON Files

Caution: IDE Deprecation

We have been decided to no longer support the IDE from 2022. We recommend that you use the VS Code extension instead.

When you write an app, you need to define a configuration file called appinfo.json. If you create a service along with your app, you need to define a configuration file called service.json.

Now, if you create a project with the webOS TV IDE, there is no need to create your own appinfo.json file or services.json file. However, if you import a project without these two JSON files, you do need to create them on your own. The webOS TV IDE provides a config file template for appinfo.json and service.json, which is the same as the webOS TV CLI provides. Read along to how you can set the JSON files.

appinfo.json

The appinfo.json file contains app metadata and is used by webOS TV to determine the app information and to launch the app. For detailed information on the appinfo.json file, see appinfo.json.

Adding appinfo.json

As mentioned in the introduction, if your project is missing appinfo.json, you need to create it manually, by following one of the options below.

  • From the workbench menu bar, select webOS Menu > New > appinfo.json.
  • From the workbench menu bar, select File > New > Other.. > webOS > appinfo.json.
  • From the workbench toolbar, click the arrow next to the new wizard icon and select Other.. > webOS > appinfo.json.
  • Right-click on any place in the Project Explorer view, select New > Other.. > webOS > appinfo.json.

Configuring appinfo.json

To configure the appinfo.json file, open the file by double-clicking it from the Project Explorer view. (Note that if you have just created a new project, it appears on the first screen, thus no need to open it.) The default tab you see is the Overview tab. You can modify the file using either one of the tabs.

  • Using the Overview tab: This tab is comprised of user-friendly UI. You can only fill in the mandatory properties. However, you cannot add optional properties on this tab.
  • Using the appinfo.json tab: This tab shows a JSON object in its raw form. You can edit mandatory properties and add/edit optional properties on this tab.

The webOS TV IDE checks for syntax errors and provides warnings when you save your appinfo.json. You might see red and yellow icons on the code on the Overview tab; these icons imply that the code has the property name or value that is not supported. Make sure you enter valid properties when these icons appear on the tab.

  • Error icon: Indicates a syntax error
  • Warning icon: Indicates a warning

services.json

The services.json file contains service metadata and defines what commands the service provides. Your service must have this file configured.

Adding services.json

If your JS service project is missing services.json, you need to create it manually by following one of the options below.

  • From the workbench menu bar, select webOS Menu > New > services.json.
  • From the workbench menu bar, select File > New > Other.. > webOS > services.json.
  • From the workbench toolbar, click the arrow next to the new wizard icon and select Other.. > webOS > services.json.
  • Right-click on any place in the Project Explorer view, select New > Other.. > webOS > services.json.

Configuring services.json

To configure the service.json file, open the file by double-clicking it from the Project Explorer view. Unlike the appinfo.json file, no user-friendly UI version for viewing the file is provided.

Check the service.json specification for valid properties.

No Headings