Reputation: 175
Is there a way to tell if the input was passed as parameters or as an object? If I pass as parameters the data is in the form of a=1&b=2&c=3
but if I pass a JSon objec
t as an input it is in the form {"a" : 1, "b" : 2, "c" : 3 }
I need to extract the value of c
from the inputs being passed. So for my parsing routine how do I tell the form it is in? Or is there a better way?
Thanks.
Upvotes: 0
Views: 903
Reputation: 31
Newtonsoft.JSON or JSON.NET should be a Framework to work with(Available at nuGet) - It is able to parse JSON to Array, List or Dictionary. You can then grab the Data from Array/List/Dictionary and fill it into your POST.
Serializing and Deserializing JSON
Upvotes: 1