Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible to supply dynamic keys? #19

Open
absolutejam opened this issue May 28, 2020 · 1 comment
Open

Possible to supply dynamic keys? #19

absolutejam opened this issue May 28, 2020 · 1 comment

Comments

@absolutejam
Copy link

absolutejam commented May 28, 2020

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
@tamizhvendan
Copy link
Collaborator

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 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants