Very simple.Code
Using system;
Using system. Collections. Generic;
Using system. text;
Using newtonsoft. JSON;
Namespace testjson
{
Class Program
{
Static void main (string [] ARGs)
{
String JSON = "{\" A \ ": \" sadsad \ ", \" C \ ": {\" d \ ": \" ADAD \"}}";
// CCC = new CCC ();
// CCC. d = "ADAD ";
// AAA = new AAA ();
// AAA. A = "sadsad ";
// AAA. B = "dfgdg ";
// AAA. c = CCC;
AAA = new AAA ();
AAA = javascriptconvert. deserializeobject <AAA> (JSON );
// String JSON = javascriptconvert. serializeobject (AAA );
// Console. writeline (JSON );
Console. Read ();
}
}
Public class AAA {
Private string M_a;
Public String
{
Get {return M_a ;}
Set {M_a = value ;}
}
Private string m_ B;
Public String B
{
Get {return m_ B ;}
Set {m_ B = value ;}
}
Private CCC M_c;
Public CCC C
{
Get {return M_c ;}
Set {M_c = value ;}
}
}
Public class ccc
{
Private string m_d;
Public String d
{
Get {return m_d ;}
Set {m_d = value ;}
}
}
}