I have txt file(not json file) which is like the format below. I need to deserialize it into key and value string if possible but I just need it to read the txt file and extract the values such as MulTwoNumbers, Multiplying two numbers, etc, then assign it into string variables.
I tried to use StreamReader and read it line by line and try to match the Regex pattern but it is troublesome for me and did not work as intended. Here is the Regex pattern that I used, I only tried to get _name value because I didn't know how to get all those other values:
Regex regex = new Regex(@"(?<=_name\x22:\x22)\w+");
{"_name":"MulTwoNumbers","_description":"Multiplying two numbers","_api_endpoint":"http://localhost:64780/api/calculator/MulTwoNumbers","number_operand":"2","_operand_type":"integer"}
{"_name":"ADDThreeNumbers","_description":"Adding three numbers","_api_endpoint":"http://localhost:64780/api/calculator/ADDThreeNumbers","number_operand":"3","_operand_type":"integer"}