Example #1
0
 public static T DeserializeObject <T>(string json)
 {
     return((T)((object)SimpleJsonTool.DeserializeObject(json, typeof(T), null)));
 }
Example #2
0
 public static object DeserializeObject(string json, Type type)
 {
     return(SimpleJsonTool.DeserializeObject(json, type, null));
 }
Example #3
0
 public static T DeserializeObject <T>(string json, IJsonSerializerStrategy jsonSerializerStrategy)
 {
     return((T)((object)SimpleJsonTool.DeserializeObject(json, typeof(T), jsonSerializerStrategy)));
 }
Example #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);
        }