Beispiel #1
0
        internal static object Deserialize(JsonSerializer serializer, string input, Type type, int depthLimit)
        {
            if (input == null)
            {
                throw new ArgumentNullException("input");
            }
            if (input.Length > serializer.MaxJsonLength)
            {
                throw new ArgumentException(Resources.JSON_MaxJsonLengthExceeded, "input");
            }

            object o = JsonDeserializer.BasicDeserialize(input, depthLimit, serializer);

            return(ObjectConverter.ConvertObjectToType(o, type, serializer));
        }