标签:des style class blog code java
1.JSON序列化
string JsonStr= JsonConvert.SerializeObject(Entity);
eg:
A a=new A();
a.Name="Elain00";
a.Hobby="eat eat";
string jsonStr=JsonConvert.SerializeObject(a);
2.JSON反序列化
string jsonstr =
"jsonString";
Class model =
JsonConvert.DeserializeObject<Class>(jsonstr);
eg:
string JsonStr=‘"{\‘Name\‘:\‘Elaine00\‘,\‘Hobby\‘:\‘eat eat\‘}";
A a=JsonConvert.DeserializeObject<A>(JsonStr);
标签:des style class blog code java
原文地址:http://www.cnblogs.com/ITGirl00/p/3783515.html