Hi,
I am trying to read from appsettings.json for a particular key / value pair and store it in a variable. Is this possible with IA?
I realize there is Parse string, but it feels fragile. If new keys are added around the pair I am looking to find and store, then it will break.
Thanks in advance.
Read and store a line from file
-
- Site Admin
- Posts: 5361
- Joined: Sun Aug 22, 2010 4:28 am
Re: Read and store a line from file
Unfortunately, there isn't a built-in method for reading or importing a key from a json file.
The only option is with using 'Read from Text File' command, and then 'Parse String' to isolate a specific key.
Alternatively, you may develop your own method in a EXE or DLL ...or a plugin.
The only option is with using 'Read from Text File' command, and then 'Parse String' to isolate a specific key.
Alternatively, you may develop your own method in a EXE or DLL ...or a plugin.
Francesco Toscano
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
Re: Read and store a line from file
Thanks Francesco, That's exactly what I am doing right now. Read from text and parse.
But I was hoping for more robust approach to do this. Even if the appsettings keys / values placement between other keys changes in future, I was hoping there was a way to keep finding the right key / value pair.
Do you know if there's any plan to support json parsing by IA in the future since JSon for appsettings is becoming more and more common?
Thanks
But I was hoping for more robust approach to do this. Even if the appsettings keys / values placement between other keys changes in future, I was hoping there was a way to keep finding the right key / value pair.
Do you know if there's any plan to support json parsing by IA in the future since JSon for appsettings is becoming more and more common?
Thanks
-
- Site Admin
- Posts: 5361
- Joined: Sun Aug 22, 2010 4:28 am
Re: Read and store a line from file
I'll add your request to our to-do list...let's see what happens.
Thanks!
Thanks!
Francesco Toscano
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
Re: Read and store a line from file
Thanks Francesco. Appreciate it.
Who is online
Users browsing this forum: No registered users and 29 guests