I have a JSON encoded string. It looks like this:
{"jsonrpc":"2.0","method":"test","params":["80851851709e01bc9453cced585a7bca","this"],"id":3}
I cannot get access to 'params' with C# for some reason. The object comes back null. Here is the code I am using:
public class Access : System.Web.Services.WebService
{
[WebMethod]
public string EntryMethod(string json)
{
Requests d = JsonConvert.DeserializeObject<Requests>(json);
return "done";
}
}
public class Requests
{
public string jsonrpc { get; set; }
public string method { get; set; }
public List<string> param { get; set; }
public string id { get; set; }
}
Any ideas?
paramnotparams. I guess that is the reason