code: private Object resolveHostObject(Object value, Context cx, Scriptable scope) throws Exception {
  		if (value instanceof List) { // list -> array
  			return RHINO.fromList((List<?>) value, cx, scope);
  		}
  		if (value instanceof Map) { // map -> object
  			return RHINO.fromMap((Map<?, ?>) value, cx, scope);
  		}
  		if (value instanceof String) {
  			String string = (String) value;
  			if (string.endsWith(jsSuffix)) { // .js source
  				return MODS.create(string, null, scope, cx);
  			}
  			if (string.endsWith(jsonSuffix)) { // .json structure
  				return JsonDeserializer.JSON_DESERIALIZER.deserialize((new URL(string).openStream()));
  			}
  		}
  		return value;
  	}
docs: /* host objs smartness