public M_data getM_DataByJson(String json) { if (String.IsNullOrEmpty(json)) { return null; } try { M_data info = new M_data(); MemoryStream ms = new MemoryStream(Encoding.UTF8.GetBytes(json)); DataContractJsonSerializer ser = new DataContractJsonSerializer(info.GetType()); info = ser.ReadObject(ms) as M_data; return info; } catch { } return null; }