ConvertJsonStringToObject

public static T ConvertJsonStringToObject<T>(this string stringToDeserialize)
{
   JavaScriptSerializer serializer = new JavaScriptSerializer();
   return serializer.Deserialize<T>(stringToDeserialize);
}
Example:
Person per = jsonString.ConvertJsonStringToObject<Person>();

Description

Converts a JSON string to an object

Details

Double click on the code to select all.

 

;