code: private <T> T parseRoot(Map<String, Object> input, Class<T> declaredType) throws Exception {
          Object parsed = parseBean(input, declaredType);
          return declaredType.cast(parsed);
      }
docs: Parses the root bean.
  
  @param input  the map input, not null
  @param declaredType  the declared type, not null
  @return the bean, not null
  @throws Exception if an error occurs