Skip to content

Incorrect nesting of Object when value is Object and Object properties contain a colon #393

Description

@dbrixey

Hi,

This looks similar to issue #301, but is still present.

nconf version - ^0.11.3
node version - v14.18.1

Example code:

  nconf.add('env', {type: 'file', file: configFilePath, accessSeparator: '.', logicalSeparator: '.'})
  const metaData = {
    'https://some.site.com##metadata' : {
      siteKey: 'siteValue'
    }
  };
  nconf.set('metaData', metaData)
  console.log(nconf.get('metaData'));
  // Output (internal object split by default separator)
  // { https: { '//some.site.com##metadata': { siteKey: 'siteValue' } } }

I expect the object structure of 'metaData' to be preserved.

output of default.json:

{
  "isTest": true
}

FWIW I tried the beta version and still experienced the issue.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions