CSharp examples for System.Runtime.Serialization.Json:Json
Json Deserialize
using System.Runtime.Serialization.Json; using System.Collections.Generic; using System.Text; using System.IO;/*from w ww.j a va 2s.c om*/ using System; public class Main{ public static T JsonDeserialize<T>(string jsonString) { DataContractJsonSerializer ser = new DataContractJsonSerializer(typeof(T)); MemoryStream ms = new MemoryStream(Encoding.UTF8.GetBytes(jsonString)); T obj = (T)ser.ReadObject(ms); return obj; } }