docs: function(json, type) {
  			var Def, def, val, desc, types = Object.create(null);
  			var base = type.constructor.prototype;
  			var name = type.constructor.$classname;
  			evalheaders(json, type);
  			definitions(type).forEach(function(key) {
  				def = type[key];
  				val = json[key];
  				switch (def) {
  					case Object:
  						//	console.error('TODO: Support Object in edb.ObjectPopulator');
  						type[key] = {};
  						break;
  					case Array:
  						if (val && Array.isArray(val)) {
  							type[key] = val.slice();
  						} else {
  							type[key] = [];
  						}
  						break;
  					default:
  						if (isdefined(val)) {
  							if (isdefined(def)) {
  								if (iscomplex(def)) {
  									if (isfunction(def)) {
  										if (!isconstructor(def)) {
  											def = def(val);
  										}
  										if (isconstructor(def)) {
  											if (val !== null) {
  												Def = def;
  												types[key] = Def.from(json[key]);
  											}
  										} else {
  											failconstructor(name, key);
  										}
  									} else {
  										types[key] = edb.Type.cast(isdefined(val) ? val : def);
  									}
  								}
  							} else {
  								faildefined(name, key);
  							}
  						} else {
  							if (isregular(key) && edb.Type.isConstructor(def)) {
  								/*
  								 * TODO: cleanup something here
  								 */
  								if (edb.Array.isConstructor(def)) {
  									json[key] = [];
  								} else {
  									json[key] = null; // TODO: stay null somehow...
  								}
  								Def = def;
  								types[key] = Def.from(json[key]);
  							} else {
  								if ((desc = lookupDescriptor(base, key))) {
  									Object.defineProperty(json, key, desc);
  								}
  							}
  						}
  						break;
  				}
  			});
  			gui.Object.nonmethods(json).forEach(function(key) {
  				var def = json[key];
  				if (isregular(key) && gui.Type.isComplex(def)) {
  					if (!types[key]) {
  						types[key] = edb.Type.cast(def);
  					}
  				}
  			});
  			return types;
  		}