8000 Incorrect nesting of Object when value is Object and Object properties contain a colon · Issue #393 · indexzero/nconf · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Incorrect nesting of Object when value is Object and Object properties contain a colon #393
Open
@dbrixey

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.

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

      0