class Invoker {

	@SuppressWarnings({ "rawtypes", "unchecked" })
	Object convert(Type type, Object value) throws Exception {
		if (type == Integer.class) {
			String v = value.toString();
			return v.isEmpty() ? null : Integer.parseInt(v);
		} else if (type == Long.class) {
			String v = value.toString();
			return v.isEmpty() ? null : Long.parseLong(v);
		} else if (type == String.class) {
			String v = value.toString().trim();
			return v.isEmpty() ? null : v;
		}
		ByteArrayInputStream stream = new ByteArrayInputStream(value.toString().getBytes(StandardCharsets.UTF_8));
		Class clazz = classOf(type);
		return webRenderer.readFrom(clazz, type, null, null, null, stream);
	}

	@Inject public  Invoker(GsonWebRenderer webRenderer, Logger logger);

}