Exemplo n.º 1
0
        public static object JsonDeserialize(this string text, Type targetType, IEnumerable <Type> types = null)
        {
            DataContractJsonSerializer serializer = new DataContractJsonSerializer(targetType, types);

            return(JsonExtension.JsonDeserializeCore(text, serializer));
        }
Exemplo n.º 2
0
        public static T JsonDeserialize <T>(this string text, IEnumerable <Type> types = null)
        {
            DataContractJsonSerializer serializer = new DataContractJsonSerializer(typeof(T), types);

            return((T)((object)JsonExtension.JsonDeserializeCore(text, serializer)));
        }