示例#1
0
 public static T DeserializeObject <T>(string json)
 {
     return((T)((object)SimpleJsonTool.DeserializeObject(json, typeof(T), null)));
 }
示例#2
0
 public static object DeserializeObject(string json, Type type)
 {
     return(SimpleJsonTool.DeserializeObject(json, type, null));
 }
示例#3
0
 public static T DeserializeObject <T>(string json, IJsonSerializerStrategy jsonSerializerStrategy)
 {
     return((T)((object)SimpleJsonTool.DeserializeObject(json, typeof(T), jsonSerializerStrategy)));
 }
示例#4
0
        public static object DeserializeObject(string json, Type type, IJsonSerializerStrategy jsonSerializerStrategy)
        {
            object obj = SimpleJsonTool.DeserializeObject(json);

            return((type != null && (obj == null || !ReflectionsUtils.IsAssignableFrom(obj.GetType(), type))) ? (jsonSerializerStrategy ?? SimpleJsonTool.CurrentJsonSerializerStrategy).DeserializeObject(obj, type) : obj);
        }