Juliano Oliveira
Juliano Oliveira

Reputation: 314

How to Deserialize this object JSON?

I need deserialize a json like this:

{"success":true,"loggedin":false,"data":{"accessTime":1285167129}}

My objects are:

public class Heartbeat
{
    public bool Success { get; set; }
    public bool Loggedin { get; set; }

    public HeartbeatData Data { get; set; }
}

public class HeartbeatData
{
    public int AccessTime { get; set; }
}

But HeartbeatData doesn´t serialize.

Upvotes: 0

Views: 151

Answers (1)

Alexander Forbes-Reed
Alexander Forbes-Reed

Reputation: 2975

Try using JSON.net to see if that will work, then we see if it's Hammock or C# causing the issue.

Upvotes: 1

Related Questions