예제 #1
0
 public T Convert <T>()
 {
     try
     {
         return(JsonParser.Deserialize <T>(_hash));
     }
     catch (Exception ex)
     {
         throw new InvalidCastException(string.Format("This JSON object cannot be converted to '{0}'.", typeof(T).FullName), ex);
     }
 }
예제 #2
0
 public object Convert(Type type)
 {
     try
     {
         return(JsonParser.Deserialize(_hash, type));
     }
     catch (Exception ex)
     {
         throw new InvalidCastException(string.Format("This JSON object cannot be converted to '{0}'.", type.FullName), ex);
     }
 }