-
Notifications
You must be signed in to change notification settings - Fork 48
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
Added JSON Arrays Support #111
base: master
Are you sure you want to change the base?
Added JSON Arrays Support #111
Conversation
Hi @alfkonee thanks for opening this. Could you give me some background and maybe some examples that highlight why this feature is needed? Just to help me put these changes in to context so I can better review them. |
This feature will allow you to use a consul Folder as the root for your config for Example with this tree.
In a Scenario like this you can add the whole tree by calling var configuration = builder
.AddConsul("myApp", cancellationToken)
.Build(); The resultant configuration would contain array sections for Hope this outlines the use cases for this. |
I've also made and API Proposal to the dotnet runtime dotnet/runtime#39429 to make this support or native Json not just Consul |
Hello @Choc13 Please any Update ON this?? |
Hey, sorry I've been busy. My current thoughts on this are that it should really live upstream in the JsonParser. Partly because it's quite a lot duplicate functionality to include in here just to support a slight alterations to the way Json parsing works. Also, until recently we had this duplication in the library because the parsing in the JsonConfigurationSource wasn't usable outside of their library. However with the addition of the JsonStreamParser we were able to use that directly. I am sympathetic to your requirements here and would like to do what I can to help. However I have to weigh up the increase in complexity for the gain in functionality. So I propose we do the following for now:
For now you should be able to write this parser in your code base and override the default parser in the settings to point to your implementation that uses this code. It would be great if you could link the upstream change request here so I can take a look at that too. Thanks. Hi |
Hello @Choc13 I agree that this implementation should live upstream in the DOTNET config Json Parser; as seen here dotnet/runtime#39429. |
Added Top Level JSON Arrays Support