code: <T> T parseRoot(JsonInput input, Class<T> declaredType) throws Exception {
          this.input = input;
          Object parsed = parseObject(input.acceptEvent(JsonEvent.OBJECT), declaredType, null, null, null, true);
          return declaredType.cast(parsed);
      }
docs: Parses the root bean.
  
  @param input  the JSON input
  @param declaredType  the declared type, not null
  @return the bean, not null
  @throws Exception if an error occurs