HELP!JSON DeserializeObject

Jul 7, 2009 at 3:31 PM
Edited Jul 7, 2009 at 3:48 PM

I have a JSON string like this

{"farmlandStatus":[{"a":4,"b":1,"c":0,"d":0,"e":1,"f":0,"g":0,"h":1,"i":100,"j":0,"k":0,"l":0,"m":0,"n":[],"o":0,"p":[],"q":1246254382,"r":1246276448},{"a":4,"b":1,"c":0,"d":0,"e":1,"f":0,"g":1,"h":1,"i":100,"j":0,"k":0,"l":0,"m":0,"n":[],"o":0,"p":{"1246299886":[1]},"q":1246254386,"r":1246299886},{"a":4,"b":1,"c":0,"d":0,"e":1,"f":1,"g":0,"h":1,"i":100,"j":0,"k":0,"l":0,"m":0,"n":[],"o":0,"p":{"1246299888":[2]},"q":1246254388,"r":1246299888},{"a":4,"b":1,"c":0,"d":0,"e":1,"f":0,"g":0,"h":1,"i":100,"j":0,"k":0,"l":0,"m":0,"n":[],"o":0,"p":[],"q":1246254384,"r":1246276452},{"a":4,"b":1,"c":0,"d":0,"e":1,"f":0,"g":0,"h":1,"i":100,"j":0,"k":0,"l":0,"m":0,"n":[],"o":0,"p":[],"q":1246254392,"r":1246264966},{"a":4,"b":1,"c":0,"d":0,"e":1,"f":0,"g":0,"h":1,"i":100,"j":0,"k":0,"l":0,"m":0,"n":[],"o":0,"p":[],"q":1246254389,"r":1246264962}],"items":{"1":{"itemId":1},"2":{"itemId":2},"4":{"itemId":4},"3":{"itemId":63}},"exp":3102,"dog":{"dogId":1,"isHungry":false}}

I use .net 2.0 +JSON.net 1.3.1

and i create class like this

private void button1_Click(object sender, EventArgs e)
        {
          
          
           farmlandstatus abc =JavaScriptConvert.DeserializeObject<farmlandstatus>(textBox1 .Text) ;
              button1.Text = "";
           
 
        }
      
        public class farmland
        {  
            public int a, b , c,d,e,f , g , h,  i ,j, k ,l, m , o,q , r ;
    
        
        }
        public class farmlandstatus
        {
            public List<farmland> farmlandStatus =new List<farmland>();
        
        
        }

 

but It seems not easy to DeserializeObject THE "P" because the number like "1246299888" always change,it is  userid..

how can i Deserialize this JSON...  or how to ignore THE "P" not to Deserialize..

help ...

 

thanks