DeserializeObject() public static method

Method to reconstruct an Object from JSON string
public static DeserializeObject ( String pstring, Type objectType ) : Object
pstring String
objectType System.Type
return Object
 public object Load(string contents, Type type)
 {
     lock (thisLock)
     {
         if (data.Keys.Contains(type.Name))
         {
             contents = data[type.Name];
         }
         return(JsonHelper.DeserializeObject(contents, type));
         //return XmlHelper.DeserializeObject(contents, type);
     }
 }
Example #2
0
 public object Load(string contents, Type type)
 {
     return(JsonHelper.DeserializeObject(contents, type));
 }