Hello,
This is not fez related but I have a question with json. I am using a service called Cloudflare and I use their api to check to the threat score of ip addresses. The api returns JSON, I don’t have much experience with json so I tired using json2csharp but this is what I get:
public class Response
{
public string __invalid_name__219.234.82.61 { get; set; }
}
public class RootObject
{
public Response response { get; set; }
public string result { get; set; }
public object msg { get; set; }
}
The responses that I can get from the api request are:
{"response":{"219.234.82.61":"BAD:45"},"result":"success","msg":null}
{"response":{"219.646.74.21":false},"result":"success","msg":null}
These are things that go in the msg area.
"E_UNAUTH" -- Authentication could not be completed
"E_INVLDINPUT" -- Some other input was not valid
"E_MAXAPI" -- You have exceeded your allowed number of API calls.
Can anyone guide me towards something to deserialize the JSON.
Thanks,