I need to read my application settings as a dictionary like this: App1: values1, App2: values2, App3: values3
, where values
are having properties like Label
(string) and EnvVar
(dictionary < string, string >).
So far I have two options:
Is it possible to use DictionaryAdapter to read these settings? I didn't find any clue in the documentation or on Google, the best I can do so far is retrieve a list of strings and parse the strings in the code, which I would like to avoid if possible.
Another way would be to use a JSON deserializer, but it seems that I can't deserialize an interface, like I can with Castle DictionaryAdapter, so I need to define both the settings interface and the class that implements it. Is there any JSON library that can deserialize an interface like Castle DictionaryAdapter does?