Given:
PowerShell 5.1
Text data file
I need to get those key value pairs (delimited by “:”) and convert them to json. I was thinking getting the colons via regex “s:s” then replace with “=” sign and then turn into hashtable, and then use ConvertTo-Json
Would this be a good design?
Data text file
some unimportant variables
some unimportant variables - c:blah
some unimportant variables
List keys.
key1 : value1
key2 : value2
List keys complete.
some unimportant variables