Example #1
0
        protected override void Read(DubProject target, Object input, List<Object> subPackages)
        {
            var json = input as JSONObject;

            if (input is TextReader)
                json = new JSONThingDeserializer().Deserialize (input as TextReader);
            else if(json == null)
                throw new ArgumentException("input");

            foreach (var kv in json.Properties)
                TryPopulateProperty (target, kv.Key, kv.Value, subPackages);
        }
Example #2
0
        protected override void Read(DubProject target, Object input, List <Object> subPackages)
        {
            var json = input as JSONObject;

            if (input is TextReader)
            {
                json = new JSONThingDeserializer().Deserialize(input as TextReader);
            }
            else if (json == null)
            {
                throw new ArgumentException("input");
            }

            foreach (var kv in json.Properties)
            {
                TryPopulateProperty(target, kv.Key, kv.Value, subPackages);
            }
        }