JSON data looks like this:
{"name":"John", "age":30, "car":null}
Your data is an HTML Query string, where each term is separated by ampersands, each of which contains key and value parts seperated by equal signs.
To process this, use string.Split to break it on the ampersands:
string[] terms = input.Split("&");
Then loop through each separating them into key and value:
foreach (string term in terms)
{
string[] parts = term.Split("=");
...
}
You could then use a
switch
to decide what each key is and thus what you need to do with the values:
switch(parts[0].ToLower())
{
default: throw new (ArgumentException($"Unknown key: {parts[0]"));
case "response":
...
break;
...
}