Sabiha
4 years agoOccasional Contributor
Reading/setting values in appsettings.json file
Hi everyone, I need to read the localization settings from my appsettings.json file on my server and possible update them too as part of my automated testing. Basically, I need to be able chec...
- 4 years ago
Thanks for your reply AlexKaras
Just wanted to update to say that I had managed to get something working, similar to your code above, but using JSON.parse
var fileContents = aqFile.ReadWholeTextFile(filePath, aqFile.ctANSI)
var appSettings = JSON.parse(fileContents)
var defaultLanguage = appSettings.MyID.Localization.FallbackLanguage
return defaultLanguageI haven't tried updating the file yet, haven't need to so far...