Skip to content
This repository was archived by the owner on Apr 17, 2023. It is now read-only.
This repository was archived by the owner on Apr 17, 2023. It is now read-only.

Add support for loading and parsing the configuration file as part of the SDK init #318

Open
@wei-lee

Description

@wei-lee

Feature Request

At the moment, developers need to provide the JSON object of the configuration when initialise the SDK, here is an example.

In this example, the content of mobile-services.json is put into a JS file and then required by the user's application. This is due to the fact that JSON format is not universally supported by all the loaders/importers in nodejs/typescript. It is supported by the newer versions of node and typescript, but the older ones don't.

To make it easier for developers to use our SDK, we should handle the loading and parsing of the mobile-services.json file. It will:

  1. Make it easier for developers to consume our SDK
  2. Make it easier for us to document the setup steps.

A possible approach is to allow developers to provide the path to the mobile-services.json file as part of the SDK initialisation. The SDK will still be backward compatible if the parameter to initialise the SDK is an object. But if the parameter is a String type, the SDK will then load and parse the configuration file and build the configuration object.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions