How do I read into a C# dictionary, a multilingual json lexicon in the form:
[{
"Top": {
"de-DE": "Oben",
"fr-FR": "haut"
}
}, {
"Football": {
"de-DE": "Fußball",
},
},
{
"Taxi": {
}
}]
In the json file there is a key, and for each supported language, a property and value. Where the word in the target language is the same as the key, there is no property for that language under that key in the json file.
At startup we load into a C# dictionary only those entries for the user language. In this snippet, the dictionary for German should be
Top, Oben
Football, Fußball
Taxi, Taxi
In French
Top, Haut
Football, Football,
Taxi, Taxi
How do I read the json file into a C# dictionary? The dictionary is not huge ... hundreds rather than millions of entries, so performance is not critical.