3D-City Model
    Preparing search index...

    Function parseConfigFromJson

    • Recursively parses and resolves a configuration object. Handles "globalConfig" merging, nested URLs, arrays, and indirect references.

      For every key-value pair:

      • If the value is an array, all entries are resolved and flattened.
      • If the value is an object with "url" and "resolve" keys, it is replaced via that URL.
      • If the value is a string ending in ".json" (excluding "tileset.json"), loads and resolves its content.
      • If the value is a string ending in ".txt", reads comma-separated references and resolves each.
      • Otherwise, leaves the value as is. If "globalConfig" exists as a key, its content is deeply merged with the resolved config using full replacement.

      Parameters

      • config: Object

        The input (possibly partially resolved) config object.

      Returns Promise<Object>

      Fully resolved object.

      const obj = await parseConfigFromJson({foo: "bar.json"});