FsConfig icon indicating copy to clipboard operation
FsConfig copied to clipboard

Possible to supply dynamic keys?

Open absolutejam opened this issue 4 years ago • 1 comments

Description

Just curious if there's any way to supply dynamic keys, like a Map<string, string>? eg. if I had a top-level Connections key, I could add in an entry for each DB connection.

I tried using Dictionary<string, string> but got a not implemented error.

Related information

  • macOS Mojave
  • FSconfig 2.1.6
  • 3.1.300 .NET core

absolutejam avatar May 28 '20 05:05 absolutejam

Hi @absolutejam, sorry for the delayed reply.

Dictionary<string, string> is currently not supported as the target type. You can extend FsConfig to support this by adding an implementation like parseFSharpList.

You may have to consider the separator logic for separating each key-value entry. It'd be great if it is configurable like the SplitCharacter logic that we have for parsing FSharp List type.

Due to personal reasons, I am not actively working on any Open source stuff. If you can send an MR, I am open to review and merge it :)

tamizhvendan avatar Aug 24 '21 12:08 tamizhvendan