JSON deserializer

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,

This property name looks weird to me:

__invalid_name__219.234.82.61

Have you seen JSON related shares on codeshare?

http://www.tinyclr.com/codeshare/entry/282

and

http://www.tinyclr.com/codeshare/entry/357

Thanks,
I will take a look at those links.

You are welcome!

If it’s not fez related, then maybe you’re using the full framework? In that case you might consider using the built-in JavaScriptSerializer class: JavaScriptSerializer Class (System.Web.Script.Serialization) | Microsoft Learn