I am researching about how to load the startup config in .NET Core. I notice there are different ways to do that, I have seen XML, JSON, init file, and from a Dictionary located in memory (I will go back to this later). I'm using something like the code below:
new ConfigurationBuilder().AddJsonFile("file.json").Build();
All of that is OK, but, isn't there any way to load that configuration from a JSON string? I mean, I don't want to store the json in a temporal file because is a real-time built file and It makes no sense.
About the dictionary located in memory. Its easy to build it manually, but, What about for complex and too hierarchical JSON structures? As far as I know, the dictionary is
dictionary < string, string >
whose key is the parents of the tree concatenated by ":" managing at the same time the repeated nodes, enumerating them, etc. A pain build this algorithm from scratch.