From Json To Object - CSharp System

CSharp examples for System:Object

Description

From Json To Object

Demo Code


using System.Text;
using System.Web.UI;
using System;/* ww w  .  ja  va2s .  c o  m*/

public class Main{

    public static T FromJsonTo<T>(this T obj,string jsonString)
    {
       return new System.Web.Script.Serialization.JavaScriptSerializer().Deserialize<T>(jsonString);

    }
}

Related Tutorials