I'm using json.net for experimentation and I'm trying to create a custom converter with that json :
{
"daily" :
{
"1388361600000": 2081,
"1388448000000": 2171,
"1388534400000": 2244,
"1388620800000": 2271
},
"average":
{
"1388361600000": 1923,
"1388448000000": 1942,
"1388534400000": 1963,
"1388620800000": 1984
}
}
the keys are timestamp (they are random)
I am trying to convert to a rootobject auto-created with a Daily class and an Averange Class. I see the ReadJSON and WriteJSON things, but I don't know how to use them for my conversion. I don't want to use the dynamic keyword, I want to make a proper object. So, there's a way to convert that?
Class :
public class Rootobject
{
public Daily daily { get; set; }
public Average average { get; set; }
}
public class Daily
{
public Dictionary<string, string> dic;
}
public class Average
{
public Dictionary<string, string> dic;
}